Browse Source

Minor formatting issues

pull/9413/head
Max Katz 4 years ago
parent
commit
4043c6aa66
  1. 40
      src/Avalonia.Build.Tasks/XamlCompilerTaskExecutor.cs
  2. 2
      src/Avalonia.Themes.Fluent/FluentTheme.xaml
  3. 2
      src/Avalonia.Themes.Simple/SimpleTheme.xaml

40
src/Avalonia.Build.Tasks/XamlCompilerTaskExecutor.cs

@ -57,40 +57,40 @@ namespace Avalonia.Build.Tasks
{ {
try try
{ {
references = references.Where(r => !r.ToLowerInvariant().EndsWith("avalonia.build.tasks.dll")).ToArray(); references = references.Where(r => !r.ToLowerInvariant().EndsWith("avalonia.build.tasks.dll")).ToArray();
var typeSystem = new CecilTypeSystem(references, input); var typeSystem = new CecilTypeSystem(references, input);
var refTypeSystem = !string.IsNullOrWhiteSpace(refInput) && File.Exists(refInput) ? new CecilTypeSystem(references, refInput) : null; var refTypeSystem = !string.IsNullOrWhiteSpace(refInput) && File.Exists(refInput) ? new CecilTypeSystem(references, refInput) : null;
var asm = typeSystem.TargetAssemblyDefinition; var asm = typeSystem.TargetAssemblyDefinition;
var refAsm = refTypeSystem?.TargetAssemblyDefinition; var refAsm = refTypeSystem?.TargetAssemblyDefinition;
if (!skipXamlCompilation) if (!skipXamlCompilation)
{ {
var compileRes = CompileCore(engine, typeSystem, projectDirectory, verifyIl, defaultCompileBindings, logImportance, debuggerLaunch); var compileRes = CompileCore(engine, typeSystem, projectDirectory, verifyIl, defaultCompileBindings, logImportance, debuggerLaunch);
if (compileRes == null) if (compileRes == null)
return new CompileResult(true); return new CompileResult(true);
if (compileRes == false) if (compileRes == false)
return new CompileResult(false); return new CompileResult(false);
if (refTypeSystem is not null) if (refTypeSystem is not null)
{ {
var refCompileRes = CompileCoreForRefAssembly(engine, typeSystem, refTypeSystem); var refCompileRes = CompileCoreForRefAssembly(engine, typeSystem, refTypeSystem);
if (refCompileRes == false) if (refCompileRes == false)
return new CompileResult(false); return new CompileResult(false);
} }
} }
var writerParameters = new WriterParameters { WriteSymbols = asm.MainModule.HasSymbols }; var writerParameters = new WriterParameters { WriteSymbols = asm.MainModule.HasSymbols };
if (!string.IsNullOrWhiteSpace(strongNameKey)) if (!string.IsNullOrWhiteSpace(strongNameKey))
writerParameters.StrongNameKeyBlob = File.ReadAllBytes(strongNameKey); writerParameters.StrongNameKeyBlob = File.ReadAllBytes(strongNameKey);
asm.Write(output, writerParameters); asm.Write(output, writerParameters);
var refWriterParameters = new WriterParameters { WriteSymbols = false }; var refWriterParameters = new WriterParameters { WriteSymbols = false };
if (!string.IsNullOrWhiteSpace(strongNameKey)) if (!string.IsNullOrWhiteSpace(strongNameKey))
writerParameters.StrongNameKeyBlob = File.ReadAllBytes(strongNameKey); writerParameters.StrongNameKeyBlob = File.ReadAllBytes(strongNameKey);
refAsm?.Write(refOutput, refWriterParameters); refAsm?.Write(refOutput, refWriterParameters);
return new CompileResult(true, true); return new CompileResult(true, true);
} }
catch (Exception ex) catch (Exception ex)
{ {

2
src/Avalonia.Themes.Fluent/FluentTheme.xaml

@ -8,7 +8,7 @@
<ResourceInclude Source="/Accents/Base.xaml" /> <ResourceInclude Source="/Accents/Base.xaml" />
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
<!-- Add these as resources and not part MergedDictionaries so we can add or remove easier --> <!-- These are not part of MergedDictionaries so we can add or remove them easier -->
<ResourceInclude x:Key="BaseDark" Source="/Accents/BaseDark.xaml" /> <ResourceInclude x:Key="BaseDark" Source="/Accents/BaseDark.xaml" />
<ResourceInclude x:Key="FluentDark" Source="/Accents/FluentControlResourcesDark.xaml" /> <ResourceInclude x:Key="FluentDark" Source="/Accents/FluentControlResourcesDark.xaml" />
<ResourceInclude x:Key="BaseLight" Source="/Accents/BaseLight.xaml" /> <ResourceInclude x:Key="BaseLight" Source="/Accents/BaseLight.xaml" />

2
src/Avalonia.Themes.Simple/SimpleTheme.xaml

@ -7,7 +7,7 @@
<ResourceInclude Source="/Accents/Base.xaml" /> <ResourceInclude Source="/Accents/Base.xaml" />
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
<!-- Add these as resources and not part MergedDictionaries so we can add or remove easier --> <!-- These are not part of MergedDictionaries so we can add or remove them easier -->
<ResourceInclude x:Key="BaseDark" Source="/Accents/BaseDark.xaml" /> <ResourceInclude x:Key="BaseDark" Source="/Accents/BaseDark.xaml" />
<ResourceInclude x:Key="BaseLight" Source="/Accents/BaseLight.xaml" /> <ResourceInclude x:Key="BaseLight" Source="/Accents/BaseLight.xaml" />
</ResourceDictionary> </ResourceDictionary>

Loading…
Cancel
Save