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

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

@ -8,7 +8,7 @@
<ResourceInclude Source="/Accents/Base.xaml" />
</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="FluentDark" Source="/Accents/FluentControlResourcesDark.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" />
</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="BaseLight" Source="/Accents/BaseLight.xaml" />
</ResourceDictionary>

Loading…
Cancel
Save