mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-03-22 10:34:30 +08:00
refactor(mediator): 移除自动生成的程序集引用和中介者实现代码
- 删除了 AssemblyReference.g.cs 中的程序集引用生成代码 - 移除了 Mediator.g.cs 中的中介者依赖注入扩展实现 - 清理了内部消息处理器基类和包装器的自动生成代码 - 移除了容器探测器和元数据相关的生成代码 - 删除了中介者主类的自动生成实现
This commit is contained in:
parent
54bed12056
commit
8db379c53f
@ -1,38 +0,0 @@
|
||||
// <auto-generated>
|
||||
// Generated by the Mediator source generator.
|
||||
// </auto-generated>
|
||||
|
||||
namespace Mediator
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents an assembly reference.
|
||||
/// This is used to specify the types or assemblies to scan for Mediator handlers.
|
||||
/// </summary>
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("Mediator.SourceGenerator", "3.0.0.0")]
|
||||
public sealed class AssemblyReference
|
||||
{
|
||||
/// <summary>
|
||||
/// The assembly reference.
|
||||
/// </summary>
|
||||
public global::System.Reflection.Assembly Assembly { get; }
|
||||
|
||||
private AssemblyReference(global::System.Reflection.Assembly assembly)
|
||||
{
|
||||
Assembly = assembly;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new instance of <see cref="AssemblyReference" /> from the specified type.
|
||||
/// </summary>
|
||||
/// <param name="type">The type</param>
|
||||
/// <returns>A new instance of <see cref="AssemblyReference" /></returns>
|
||||
public static implicit operator AssemblyReference(global::System.Type type) => new AssemblyReference(type.Assembly);
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new instance of <see cref="AssemblyReference" /> from the specified assembly.
|
||||
/// </summary>
|
||||
/// <param name="assembly">The assembly</param>
|
||||
/// <returns>A new instance of <see cref="AssemblyReference" /></returns>
|
||||
public static implicit operator AssemblyReference(global::System.Reflection.Assembly assembly) => new AssemblyReference(assembly);
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,55 +0,0 @@
|
||||
// <auto-generated>
|
||||
// Generated by the Mediator source generator.
|
||||
// </auto-generated>
|
||||
|
||||
namespace Mediator
|
||||
{
|
||||
/// <summary>
|
||||
/// Provide options for the Mediator source generator.
|
||||
/// </summary>
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("Mediator.SourceGenerator", "3.0.0.0")]
|
||||
public sealed class MediatorOptions
|
||||
{
|
||||
/// <summary>
|
||||
/// The namespace in which the Mediator implementation is generated.
|
||||
/// By default, the namespace is "Mediator".
|
||||
/// </summary>
|
||||
public string Namespace { get; set; } = "Mediator";
|
||||
|
||||
/// <summary>
|
||||
/// Wether or not generated types should be <c>internal</c> (they are public by default).
|
||||
/// </summary>
|
||||
public bool GenerateTypesAsInternal { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="global::Mediator.INotificationPublisher" /> type to use when publishing notifications.
|
||||
/// By default, the type is <see cref="global::Mediator.ForeachAwaitPublisher" />.
|
||||
/// </summary>
|
||||
public global::System.Type NotificationPublisherType { get; set; } = typeof(global::Mediator.ForeachAwaitPublisher);
|
||||
|
||||
/// <summary>
|
||||
/// The default lifetime of the services registered in the DI container by the Mediator source generator.
|
||||
/// By default, the lifetime is <see cref="global::Microsoft.Extensions.DependencyInjection.ServiceLifetime.Singleton" />.
|
||||
/// </summary>
|
||||
public global::Microsoft.Extensions.DependencyInjection.ServiceLifetime ServiceLifetime { get; set; } =
|
||||
global::Microsoft.Extensions.DependencyInjection.ServiceLifetime.Singleton;
|
||||
|
||||
/// <summary>
|
||||
/// The collection of assemblies to scan for Mediator handlers.
|
||||
/// By default, the collection is empty, in which case the source generator will scan all assemblies through references from the source generated project.
|
||||
/// </summary>
|
||||
public global::System.Collections.Generic.IReadOnlyList<global::Mediator.AssemblyReference> Assemblies { get; set; } = new global::Mediator.AssemblyReference[0];
|
||||
|
||||
/// <summary>
|
||||
/// The collection of types of pipeline behaviors to register in DI.
|
||||
/// When the type is an unconstructed generic type, the source generator will register all the constructed types of the generic type (open generics that is supported during AoT).
|
||||
/// </summary>
|
||||
public global::System.Collections.Generic.IReadOnlyList<global::System.Type> PipelineBehaviors { get; set; } = new global::System.Type[0];
|
||||
|
||||
/// <summary>
|
||||
/// The collection of types of streaming pipeline behaviors to register in DI.
|
||||
/// When the type is an unconstructed generic type, the source generator will register all the constructed types of the generic type (open generics that is supported during AoT).
|
||||
/// </summary>
|
||||
public global::System.Collections.Generic.IReadOnlyList<global::System.Type> StreamPipelineBehaviors { get; set; } = new global::System.Type[0];
|
||||
}
|
||||
}
|
||||
@ -1,33 +0,0 @@
|
||||
// <auto-generated>
|
||||
// Generated by the Mediator source generator.
|
||||
// </auto-generated>
|
||||
|
||||
namespace Mediator
|
||||
{
|
||||
/// <summary>
|
||||
/// Provide options for the Mediator source generator.
|
||||
/// </summary>
|
||||
[global::System.AttributeUsage(global::System.AttributeTargets.Assembly, AllowMultiple = false)]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("Mediator.SourceGenerator", "3.0.0.0")]
|
||||
public sealed class MediatorOptionsAttribute : global::System.Attribute
|
||||
{
|
||||
/// <summary>
|
||||
/// The namespace in which the Mediator implementation is generated.
|
||||
/// By default, the namespace is "Mediator".
|
||||
/// </summary>
|
||||
public string Namespace { get; set; } = "Mediator";
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="global::Mediator.INotificationPublisher" /> type to use when publishing notifications.
|
||||
/// By default, the type is <see cref="global::Mediator.ForeachAwaitPublisher" />.
|
||||
/// </summary>
|
||||
public global::System.Type NotificationPublisherType { get; set; } = typeof(global::Mediator.ForeachAwaitPublisher);
|
||||
|
||||
/// <summary>
|
||||
/// The default lifetime of the services registered in the DI container by the Mediator source generator.
|
||||
/// By default, the lifetime is <see cref="global::Microsoft.Extensions.DependencyInjection.ServiceLifetime.Singleton" />.
|
||||
/// </summary>
|
||||
public global::Microsoft.Extensions.DependencyInjection.ServiceLifetime ServiceLifetime { get; set; } =
|
||||
global::Microsoft.Extensions.DependencyInjection.ServiceLifetime.Singleton;
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user