@@ -203,7 +203,7 @@ public static bool HasInternals
203203 ///<summary>Complies list of file items comprising an Application.</summary>
204204 public void Compile ( CompilationUnit cu )
205205 {
206- // KnownTypes, XamlTypeMapper, and ReflectionHelper all hold on to data statically that
206+ // KnownTypes, XamlTypeMapper, and ReflectionHelper all hold on to data statically that
207207 // must not be reused between compilations as different compilations can target different
208208 //
209209 // Defensively clear static data even though the prior compilation should have done it.
@@ -625,7 +625,7 @@ private void GenerateSource()
625625 // } end namespace
626626 CodeCompileUnit ccu = new CodeCompileUnit ( ) ;
627627
628- // generate pragma checksum data
628+ // generate pragma checksum data
629629 Guid hashGuid = ! string . IsNullOrEmpty ( ChecksumAlgorithm ) && ChecksumAlgorithm . Equals ( "SHA256" , StringComparison . OrdinalIgnoreCase )
630630 ? s_hashSHA256Guid
631631 : s_hashSHA1Guid ;
@@ -700,7 +700,7 @@ private SourceFileInfo OnSourceFileResolve(FileUnit file)
700700 if ( sourceFileInfo . IsXamlFile )
701701 {
702702 int fileExtIndex = file . Path . LastIndexOf ( DOTCHAR ) ;
703-
703+
704704 sourceFileInfo . RelativeSourceFilePath = file . Path . Substring ( 0 , fileExtIndex ) ;
705705 }
706706 }
@@ -849,9 +849,9 @@ internal void ProcessDefinitionNamespace(XamlDefTagNode xamlDefTagNode)
849849 case XmlNodeType . CDATA :
850850 case XmlNodeType . Text :
851851 {
852- int lineNumber = 0 ;
852+ int lineNumber = 0 ;
853853
854- if ( xmlReader is IXmlLineInfo xmlLineInfo )
854+ if ( xmlReader is IXmlLineInfo xmlLineInfo )
855855 {
856856 lineNumber = xmlLineInfo . LineNumber ;
857857 }
@@ -1563,9 +1563,9 @@ private string ParentFolderPrefix
15631563 {
15641564 // During code generation, ParentFolderPrefix returns the relative path from a .g.cs file to its markup file.
15651565 //
1566- // One example is generated #pragmas: #pragma checksum "..\..\..\..\Views\ExportNotificationView.xaml"
1566+ // One example is generated #pragmas: #pragma checksum "..\..\..\..\Views\ExportNotificationView.xaml"
15671567 //
1568- // The path information for a markup file is represented in SourceFileInfo:
1568+ // The path information for a markup file is represented in SourceFileInfo:
15691569 //
15701570 // SourceFileInfo.OriginalFilePath: "c:\\greenshot\\src\\Greenshot.Addons\\Views\\ExportNotificationView.xaml"
15711571 // SourceFileInfo.TargetPath: "c:\\greenshot\\src\\Greenshot.Addons\\obj\\Debug\\net6.0-windows\\"
@@ -1582,23 +1582,23 @@ private string ParentFolderPrefix
15821582 //
15831583 // The relative path calculation must take in to account both the TargetPath and the RelativeFilePath:
15841584 //
1585- // "c:\\greenshot\\src\\Greenshot.Addons\\obj\\Debug\\net6.0-windows\\" [SourceFileInfo.TargetPath]
1585+ // "c:\\greenshot\\src\\Greenshot.Addons\\obj\\Debug\\net6.0-windows\\" [SourceFileInfo.TargetPath]
15861586 // "Views\\ExportNotificationView" [SourceFileInfo.RelativeTargetPath]
15871587 //
15881588 // TargetPath concatenated with the directory portion of the RelativeTargetPath is the location to the .g.cs file:
15891589 //
15901590 // "c:\\greenshot\\src\\Greenshot.Addons\\obj\\Debug\\net6.0-windows\\Views"
1591- //
1591+ //
15921592 string pathOfRelativeSourceFilePath = System . IO . Path . GetDirectoryName ( SourceFileInfo . RelativeSourceFilePath ) ;
15931593
1594- // Return the parent folder of the target file with a trailing DirectorySeparatorChar.
1594+ // Return the parent folder of the target file with a trailing DirectorySeparatorChar.
15951595 // Return a relative path if possible. Else, return an absolute path.
1596- #if NETFX
1596+ #if NETFX
15971597 string path = PathInternal . GetRelativePath ( TargetPath + pathOfRelativeSourceFilePath , SourceFileInfo . SourcePath , StringComparison . OrdinalIgnoreCase ) ;
15981598#else
15991599 string path = Path . GetRelativePath ( TargetPath + pathOfRelativeSourceFilePath , SourceFileInfo . SourcePath ) ;
16001600#endif
1601- // Always return a path with a trailing DirectorySeparatorChar.
1601+ // Always return a path with a trailing DirectorySeparatorChar.
16021602 return path . TrimEnd ( Path . DirectorySeparatorChar ) + Path . DirectorySeparatorChar ;
16031603 }
16041604 else
@@ -1616,7 +1616,7 @@ private string ParentFolderPrefix
16161616 }
16171617
16181618 return parentFolderPrefix ;
1619- }
1619+ }
16201620 }
16211621 }
16221622
@@ -1850,7 +1850,7 @@ private CodeExpression GetPropertyValueExpression(ITypeDescriptorContext ctx, Ty
18501850
18511851 ce = cmie ;
18521852 }
1853- else if ( desc . MemberInfo is ConstructorInfo ci )
1853+ else if ( desc . MemberInfo is ConstructorInfo ci ) // instance ctor invoke
18541854 {
18551855 ParameterInfo [ ] parameters = ci . GetParameters ( ) ;
18561856
@@ -1938,10 +1938,10 @@ private CodeExpression GetEventDelegate(CodeContext cc, MemberInfo miEvent, stri
19381938 cDelExp = coce ;
19391939 }
19401940
1941-
1941+
19421942// The bug that this chunk of code works around was fixed but
19431943// exposes a different bug. To work around the second bug, we
1944- // remove the workaround for the first one.
1944+ // remove the workaround for the first one.
19451945// Note that the initial bug was not fixed for VB, so the code block above remains.
19461946// else if (Language == CompilerLanguage.JScript)
19471947// {
@@ -2641,19 +2641,19 @@ private void GenerateInitializeComponent(bool isApp)
26412641 // - Modify the AssemblyVersionAttribute to a wildcard string (e.g. "1.2.*")
26422642 // - Set Deterministic to false in the build
26432643 // During MarkupCompilation, the AssemblyVersion property would not be set and WPF would correctly generate a resource URI without a version.
2644- // In .NET Core/5 (or .NET Framework SDK-style projects), the same process can be used if GenerateAssemblyVersionAttribute is set to false in
2645- // the build. However, this isn't really the idiomatic way to set the version for an assembly. Instead, developers are more likely to use the
2646- // AssemblyVersion build property. If a developer explicitly sets the AssemblyVersion build property to a wildcard version string, we would use
2647- // that as part of the URI here. This results in an error in Version.Parse during InitializeComponent's call tree. Instead, do as we would have
2644+ // In .NET Core/5 (or .NET Framework SDK-style projects), the same process can be used if GenerateAssemblyVersionAttribute is set to false in
2645+ // the build. However, this isn't really the idiomatic way to set the version for an assembly. Instead, developers are more likely to use the
2646+ // AssemblyVersion build property. If a developer explicitly sets the AssemblyVersion build property to a wildcard version string, we would use
2647+ // that as part of the URI here. This results in an error in Version.Parse during InitializeComponent's call tree. Instead, do as we would have
26482648 // when the developer sets a wildcard version string via AssemblyVersionAttribute and use an empty string.
26492649 string version = hasWildcard || String . IsNullOrEmpty ( AssemblyVersion )
2650- ? String . Empty
2650+ ? String . Empty
26512651 : COMPONENT_DELIMITER + VER + AssemblyVersion ;
26522652
2653- string token = String . IsNullOrEmpty ( AssemblyPublicKeyToken )
2654- ? String . Empty
2653+ string token = String . IsNullOrEmpty ( AssemblyPublicKeyToken )
2654+ ? String . Empty
26552655 : COMPONENT_DELIMITER + AssemblyPublicKeyToken ;
2656-
2656+
26572657 uriPart = FORWARDSLASH + AssemblyName + version + token + COMPONENT_DELIMITER + COMPONENT + FORWARDSLASH + resourceID ;
26582658
26592659 //
0 commit comments