mirror of
https://github.com/aaru-dps/Aaru.Checksums.git
synced 2025-12-16 19:24:29 +00:00
Move plugin registers to source generator.
This commit is contained in:
@@ -28,6 +28,7 @@
|
|||||||
<Authors>Natalia Portillo <claunia@claunia.com></Authors>
|
<Authors>Natalia Portillo <claunia@claunia.com></Authors>
|
||||||
<DisableImplicitNamespaceImports>true</DisableImplicitNamespaceImports>
|
<DisableImplicitNamespaceImports>true</DisableImplicitNamespaceImports>
|
||||||
<EnableTrimAnalyzer>true</EnableTrimAnalyzer>
|
<EnableTrimAnalyzer>true</EnableTrimAnalyzer>
|
||||||
|
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||||
<NoWarn>CS1591;CS1574</NoWarn>
|
<NoWarn>CS1591;CS1574</NoWarn>
|
||||||
@@ -62,4 +63,7 @@
|
|||||||
<PackageReference Include="Aaru.Checksums.Native" Version="6.0.0-alpha6"/>
|
<PackageReference Include="Aaru.Checksums.Native" Version="6.0.0-alpha6"/>
|
||||||
<PackageReference Include="Unclassified.NetRevisionTask" Version="0.4.3" PrivateAssets="all"/>
|
<PackageReference Include="Unclassified.NetRevisionTask" Version="0.4.3" PrivateAssets="all"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Aaru.Generators\Aaru.Generators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false"/>
|
||||||
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
44
Register.cs
44
Register.cs
@@ -36,49 +36,11 @@
|
|||||||
// Copyright © 2011-2023 Natalia Portillo
|
// Copyright © 2011-2023 Natalia Portillo
|
||||||
// ****************************************************************************/
|
// ****************************************************************************/
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Reflection;
|
|
||||||
using Aaru.CommonTypes.Interfaces;
|
using Aaru.CommonTypes.Interfaces;
|
||||||
|
|
||||||
namespace Aaru.Checksums;
|
namespace Aaru.Checksums;
|
||||||
|
|
||||||
|
// Needs to have the interface here so the source generator knows THIS IS the class
|
||||||
|
// ReSharper disable once RedundantExtendsListEntry
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public sealed class Register : IPluginRegister
|
public sealed partial class Register : IPluginRegister {}
|
||||||
{
|
|
||||||
/// <inheritdoc />
|
|
||||||
public List<Type> GetAllChecksumPlugins() => Assembly.GetExecutingAssembly().GetTypes().
|
|
||||||
Where(t => t.GetInterfaces().Contains(typeof(IChecksum))).
|
|
||||||
Where(t => t.IsClass).ToList();
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
public List<Type> GetAllFilesystemPlugins() => null;
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
public List<Type> GetAllFilterPlugins() => null;
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
public List<Type> GetAllFloppyImagePlugins() => null;
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
public List<Type> GetAllMediaImagePlugins() => null;
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
public List<Type> GetAllPartitionPlugins() => null;
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
public List<Type> GetAllReadOnlyFilesystemPlugins() => null;
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
public List<Type> GetAllWritableFloppyImagePlugins() => null;
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
public List<Type> GetAllWritableImagePlugins() => null;
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
public List<Type> GetAllArchivePlugins() => null;
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
public List<Type> GetAllByteAddressablePlugins() => null;
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user