.NET Format Style Fixes

This commit is contained in:
refringe
2025-06-18 17:09:20 +00:00
committed by Format Bot
parent ca0a7d6345
commit 6e01428b2b
774 changed files with 23507 additions and 40003 deletions
@@ -1,21 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Reference Include="Ceciler.Interfaces">
<HintPath>..\..\Ceciler\Ceciler.Interfaces.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Mono.Cecil" Version="0.11.6" >
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<Reference Include="Ceciler.Interfaces">
<HintPath>..\..\Ceciler\Ceciler.Interfaces.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Mono.Cecil" Version="0.11.6">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
</Project>
@@ -21,7 +21,6 @@ public class VirtualizerPatch : IPatcher
continue;
}
if (typeDefinitionMethod.IsFinal && typeDefinitionMethod.IsVirtual)
{
typeDefinitionMethod.IsFinal = false;
@@ -59,27 +58,25 @@ public class VirtualizerPatch : IPatcher
}
#if DEBUG
var writerParams = new WriterParameters()
{
WriteSymbols = true
};
var writerParams = new WriterParameters() { WriteSymbols = true };
assembly.Write(writerParams);
#else
assembly.Write();
#endif
}
static bool MethodIsSerializationCallback(MethodDefinition method)
{
return ContainsAttribute(method.CustomAttributes, "OnSerializingAttribute")
|| ContainsAttribute(method.CustomAttributes, "OnSerializedAttribute")
|| ContainsAttribute(method.CustomAttributes, "OnDeserializingAttribute")
|| ContainsAttribute(method.CustomAttributes, "OnDeserializedAttribute");
|| ContainsAttribute(method.CustomAttributes, "OnSerializedAttribute")
|| ContainsAttribute(method.CustomAttributes, "OnDeserializingAttribute")
|| ContainsAttribute(method.CustomAttributes, "OnDeserializedAttribute");
}
public static bool ContainsAttribute(IEnumerable<CustomAttribute> attributes, string attributeName) =>
attributes.Any(attribute => attribute.Constructor.DeclaringType.Name == attributeName);
public static bool ContainsAttribute(
IEnumerable<CustomAttribute> attributes,
string attributeName
) => attributes.Any(attribute => attribute.Constructor.DeclaringType.Name == attributeName);
public string Name
{