@@ -83,15 +83,15 @@ type CvtResFile() =
8383 pAdditional.DataSize <- cbData
8484 pAdditional.pstringType <- CvtResFile.ReadStringOrID reader
8585 pAdditional.pstringName <- CvtResFile.ReadStringOrID reader
86- stream.Position <- stream.Position + 3 L &&& ~~~ 3 L
86+ stream.Position <- stream.Position + 3 L &&& ~~~ 3 L
8787 pAdditional.DataVersion <- reader.ReadUInt32()
8888 pAdditional.MemoryFlags <- reader.ReadUInt16()
8989 pAdditional.LanguageId <- reader.ReadUInt16()
9090 pAdditional.Version <- reader.ReadUInt32()
9191 pAdditional.Characteristics <- reader.ReadUInt32()
9292 pAdditional.data <- Array.zeroCreate ( int pAdditional.DataSize)
9393 reader.Read( pAdditional.data, 0 , pAdditional.data.Length) |> ignore< int>
94- stream.Position <- stream.Position + 3 L &&& ~~~ 3 L
94+ stream.Position <- stream.Position + 3 L &&& ~~~ 3 L
9595
9696 if
9797 pAdditional.pstringType.theString = Unchecked.defaultof<_>
@@ -174,6 +174,7 @@ type SectionCharacteristics =
174174type ResourceSection () =
175175 new ( sectionBytes: byte[], relocations: uint32[]) as this =
176176 ( ResourceSection())
177+
177178 then
178179 Debug.Assert( sectionBytes :> obj <> Unchecked.defaultof<_>)
179180 Debug.Assert( relocations :> obj <> Unchecked.defaultof<_>)
@@ -374,13 +375,8 @@ type VersionHelper() =
374375 ///
375376 /// <returns>True when parsing succeeds completely (i.e. every character in the string was consumed), false otherwise.</returns>
376377 static member private TryParse
377- (
378- s : string ,
379- allowWildcard : bool ,
380- maxValue : uint16 ,
381- allowPartialParse : bool ,
382- [<Out>] version : byref < Version >
383- ) =
378+ ( s : string , allowWildcard : bool , maxValue : uint16 , allowPartialParse : bool , [<Out>] version : byref < Version >)
379+ =
384380 Debug.Assert( not allowWildcard || maxValue < UInt16.MaxValue)
385381
386382 if String.IsNullOrWhiteSpace s then
@@ -520,20 +516,24 @@ type VersionResourceSerializer() =
520516
521517 member val private _isDll = Unchecked.defaultof< bool> with get, set
522518
523- new ( isDll: bool,
524- comments: string,
525- companyName: string,
526- fileDescription: string,
527- fileVersion: string,
528- internalName: string,
529- legalCopyright: string,
530- legalTrademark: string,
531- originalFileName: string,
532- productName: string,
533- productVersion: string,
534- assemblyVersion: Version) as this =
519+ new
520+ (
521+ isDll: bool,
522+ comments: string,
523+ companyName: string,
524+ fileDescription: string,
525+ fileVersion: string,
526+ internalName: string,
527+ legalCopyright: string,
528+ legalTrademark: string,
529+ originalFileName: string,
530+ productName: string,
531+ productVersion: string,
532+ assemblyVersion: Version
533+ ) as this =
535534
536535 VersionResourceSerializer()
536+
537537 then
538538 this._ isDll <- isDll
539539 this._ commentsContents <- comments
@@ -620,7 +620,7 @@ type VersionResourceSerializer() =
620620 static member private PadKeyLen ( cb : int ) =
621621 VersionResourceSerializer.PadToDword( cb + 3 * sizeof< WORD>) - 3 * sizeof< WORD>
622622
623- static member private PadToDword ( cb : int ) = cb + 3 &&& ~~~ 3
623+ static member private PadToDword ( cb : int ) = cb + 3 &&& ~~~ 3
624624
625625 static member val private HDRSIZE = ( int ( 3 * sizeof< uint16>)) with get, set
626626
@@ -667,7 +667,7 @@ type VersionResourceSerializer() =
667667 let mutable ( sum : int ) = 0
668668
669669 for verString in this.GetVerStrings() do
670- sum <- sum + 3 &&& ~~~ 3
670+ sum <- sum + 3 &&& ~~~ 3
671671 sum <- sum + VersionResourceSerializer.SizeofVerString( verString.Key, verString.Value)
672672
673673 sum
@@ -801,7 +801,7 @@ type VersionResourceSerializer() =
801801
802802 for entry in this.GetVerStrings() do
803803 let mutable writerPos = writer.BaseStream.Position
804- writer.Write( Array.zeroCreate ( int (( writerPos + 3 L) &&& ~~~ 3 L - writerPos)): byte[])
804+ writer.Write( Array.zeroCreate ( int (( writerPos + 3 L) &&& ~~~ 3 L - writerPos)): byte[])
805805 Debug.Assert( entry.Value <> Unchecked.defaultof<_>)
806806 VersionResourceSerializer.WriteVersionString( entry, writer)
807807
@@ -861,7 +861,7 @@ type Win32ResourceConversions() =
861861 let mutable ( i : uint16 ) = 0 us
862862
863863 while ( i < count) do
864- resStream.Position <- resStream.Position + 3 L &&& ~~~ 3 L
864+ resStream.Position <- resStream.Position + 3 L &&& ~~~ 3 L
865865 resWriter.Write iconDirEntries[( int i)]. dwBytesInRes
866866 resWriter.Write 0x00000020 u
867867 resWriter.Write 0xFFFF us
@@ -878,7 +878,7 @@ type Win32ResourceConversions() =
878878 i <- i + 1 us
879879
880880 let mutable ( RT_GROUP_ICON : WORD ) = ( RT_ ICON + 11 us)
881- resStream.Position <- resStream.Position + 3 L &&& ~~~ 3 L
881+ resStream.Position <- resStream.Position + 3 L &&& ~~~ 3 L
882882 resWriter.Write( uint32 ( 3 * sizeof< WORD> + int count * 14 ))
883883 resWriter.Write 0x00000020 u
884884 resWriter.Write 0xFFFF us
@@ -933,7 +933,7 @@ type Win32ResourceConversions() =
933933 let comments = ( defaultArg comments) Unchecked.defaultof<_>
934934 let companyName = ( defaultArg companyName) Unchecked.defaultof<_>
935935 let mutable resWriter = new BinaryWriter( resStream, Encoding.Unicode)
936- resStream.Position <- resStream.Position + 3 L &&& ~~~ 3 L
936+ resStream.Position <- resStream.Position + 3 L &&& ~~~ 3 L
937937 let mutable ( RT_VERSION : DWORD ) = 16 u
938938
939939 let mutable ver =
@@ -970,7 +970,7 @@ type Win32ResourceConversions() =
970970 Debug.Assert( resStream.Position - startPos = int64 dataSize + int64 headerSize)
971971
972972 static member AppendManifestToResourceStream ( resStream : Stream , manifestStream : Stream , isDll : bool ) =
973- resStream.Position <- resStream.Position + 3 L &&& ~~~ 3 L (* ERROR UnknownPrefixOperator "~" *)
973+ resStream.Position <- resStream.Position + 3 L &&& ~~~ 3 L (* ERROR UnknownPrefixOperator "~" *)
974974 let mutable ( RT_MANIFEST : WORD ) = 24 us
975975 let mutable resWriter = new BinaryWriter( resStream)
976976 resWriter.Write( uint32 manifestStream.Length)
0 commit comments