Commit 42bb457c authored by 阿星Plus's avatar 阿星Plus

添加啊代码注释

parent 1a86b42b
...@@ -5,12 +5,12 @@ using System.Text; ...@@ -5,12 +5,12 @@ using System.Text;
namespace Plus namespace Plus
{ {
/// <summary> /// <summary>
/// Action Output /// 输出
/// </summary> /// </summary>
public class ActionOutput public class ActionOutput
{ {
/// <summary> /// <summary>
/// Errors List /// 错误列表
/// </summary> /// </summary>
public IList<string> Errors { get; } public IList<string> Errors { get; }
...@@ -20,7 +20,7 @@ namespace Plus ...@@ -20,7 +20,7 @@ namespace Plus
public bool Success => Errors.Count == 0; public bool Success => Errors.Count == 0;
/// <summary> /// <summary>
/// Exception /// 异常
/// </summary> /// </summary>
public Exception Exception { get; set; } public Exception Exception { get; set; }
......
namespace Plus namespace Plus
{ {
/// <summary> /// <summary>
/// Action Output <see cref="T"/> /// 输出 <see cref="T"/>
/// </summary> /// </summary>
/// <typeparam name="T"></typeparam> /// <typeparam name="T"></typeparam>
public class ActionOutput<T> : ActionOutput public class ActionOutput<T> : ActionOutput
{ {
/// <summary> /// <summary>
/// <see cref="Result"/> /// 返回结果
/// </summary> /// </summary>
public T Result { get; set; } public T Result { get; set; }
} }
......
...@@ -3,10 +3,12 @@ using System; ...@@ -3,10 +3,12 @@ using System;
namespace Plus.Aspects namespace Plus.Aspects
{ {
/// <summary>
/// PlusCrossCuttingConcerns
/// </summary>
internal class PlusCrossCuttingConcerns internal class PlusCrossCuttingConcerns
{ {
public const string Validation = "PlusValidation"; public const string Validation = "PlusValidation";
public const string UnitOfWork = "PlusUnitOfWork"; public const string UnitOfWork = "PlusUnitOfWork";
public static void AddApplied(object obj, params string[] concerns) public static void AddApplied(object obj, params string[] concerns)
......
...@@ -3,17 +3,37 @@ using System.Collections.Generic; ...@@ -3,17 +3,37 @@ using System.Collections.Generic;
namespace Plus.Collections namespace Plus.Collections
{ {
/// <summary>
/// A shortcut for <see cref="ITypeList{TBaseType}"/> to use object as base type.
/// </summary>
public interface ITypeList : ITypeList<object> public interface ITypeList : ITypeList<object>
{ {
} }
/// <summary>
/// Extends <see cref="IList{Type}"/> to add restriction a specific base type.
/// </summary>
/// <typeparam name="TBaseType"></typeparam>
public interface ITypeList<in TBaseType> : IList<Type> public interface ITypeList<in TBaseType> : IList<Type>
{ {
/// <summary>
/// Adds a type to list.
/// </summary>
/// <typeparam name="T"></typeparam>
void Add<T>() where T : TBaseType; void Add<T>() where T : TBaseType;
/// <summary>
/// Checks if a type exists in the list.
/// </summary>
/// <typeparam name="T"></typeparam>
/// <returns></returns>
bool Contains<T>() where T : TBaseType; bool Contains<T>() where T : TBaseType;
/// <summary>
/// Removes a type from list
/// </summary>
/// <typeparam name="T"></typeparam>
void Remove<T>() where T : TBaseType; void Remove<T>() where T : TBaseType;
} }
} }
\ No newline at end of file
...@@ -5,16 +5,34 @@ using System.Reflection; ...@@ -5,16 +5,34 @@ using System.Reflection;
namespace Plus.Collections namespace Plus.Collections
{ {
/// <summary>
/// A shortcut for <see cref="TypeList{TBaseType}"/> to use object as base type
/// </summary>
public class TypeList : TypeList<object>, ITypeList public class TypeList : TypeList<object>, ITypeList
{ {
} }
/// <summary>
/// Extends <see cref="List{Type}"/> to add restriction a specific base type.
/// </summary>
/// <typeparam name="TBaseType"></typeparam>
public class TypeList<TBaseType> : ITypeList<TBaseType> public class TypeList<TBaseType> : ITypeList<TBaseType>
{ {
/// <summary>
/// Gets the count.
/// </summary>
public int Count { get { return _typeList.Count; } } public int Count { get { return _typeList.Count; } }
/// <summary>
/// Gets a value indicating whether this instance is read only.
/// </summary>
public bool IsReadOnly { get { return false; } } public bool IsReadOnly { get { return false; } }
/// <summary>
/// Gets or sets the <see cref="Type"/> at the specified index.
/// </summary>
/// <param name="index"></param>
/// <returns></returns>
public Type this[int index] public Type this[int index]
{ {
get { return _typeList[index]; } get { return _typeList[index]; }
...@@ -27,6 +45,9 @@ namespace Plus.Collections ...@@ -27,6 +45,9 @@ namespace Plus.Collections
private readonly List<Type> _typeList; private readonly List<Type> _typeList;
/// <summary>
/// Creates a new <see cref="TypeList{T}"/> object.
/// </summary>
public TypeList() public TypeList()
{ {
_typeList = new List<Type>(); _typeList = new List<Type>();
......
...@@ -3,13 +3,12 @@ using System.Collections.Generic; ...@@ -3,13 +3,12 @@ using System.Collections.Generic;
namespace Plus.Configuration namespace Plus.Configuration
{ {
/// <summary>
/// 用于设置/获取 自定义配置
/// </summary>
public class DictionaryBasedConfig : IDictionaryBasedConfig public class DictionaryBasedConfig : IDictionaryBasedConfig
{ {
protected Dictionary<string, object> CustomSettings protected Dictionary<string, object> CustomSettings { get; private set; }
{
get;
private set;
}
public object this[string name] public object this[string name]
{ {
......
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
namespace Plus.Configuration namespace Plus.Configuration
{ {
/// <summary>
/// 字典配置接口
/// </summary>
public interface IDictionaryBasedConfig public interface IDictionaryBasedConfig
{ {
void Set<T>(string name, T value); void Set<T>(string name, T value);
......
namespace Plus.Configuration.Startup namespace Plus.Configuration.Startup
{ {
/// <summary>
/// EventBusConfiguration
/// </summary>
internal class EventBusConfiguration : IEventBusConfiguration internal class EventBusConfiguration : IEventBusConfiguration
{ {
public bool UseDefaultEventBus { get; set; } public bool UseDefaultEventBus { get; set; }
......
using Plus.Dependency; using Plus.Dependency;
using Plus.Domain.Uow;
using Plus.Runtime.Caching.Configuration;
using System; using System;
namespace Plus.Configuration.Startup namespace Plus.Configuration.Startup
...@@ -27,19 +29,19 @@ namespace Plus.Configuration.Startup ...@@ -27,19 +29,19 @@ namespace Plus.Configuration.Startup
/// <returns></returns> /// <returns></returns>
T Get<T>(); T Get<T>();
//IUnitOfWorkDefaultOptions UnitOfWork /// <summary>
//{ /// 用于配置工作单元
// get; /// </summary>
//} IUnitOfWorkDefaultOptions UnitOfWork { get; }
//ICachingConfiguration Caching /// <summary>
//{ /// 用于配置缓存
// get; /// </summary>
//} ICachingConfiguration Caching { get; }
//IValidationConfiguration Validation /// <summary>
//{ /// 用于配置验证
// get; /// </summary>
//} IValidationConfiguration Validation { get; }
} }
} }
\ No newline at end of file
...@@ -5,6 +5,9 @@ using System.Collections.Generic; ...@@ -5,6 +5,9 @@ using System.Collections.Generic;
namespace Plus.Configuration.Startup namespace Plus.Configuration.Startup
{ {
/// <summary>
/// IValidationConfiguration
/// </summary>
public interface IValidationConfiguration public interface IValidationConfiguration
{ {
List<Type> IgnoredTypes { get; } List<Type> IgnoredTypes { get; }
......
using Plus.Dependency; using Plus.Dependency;
using Plus.Domain.Uow;
using Plus.Runtime.Caching.Configuration;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
namespace Plus.Configuration.Startup namespace Plus.Configuration.Startup
{ {
/// <summary>
/// 该类用于在启动时配置模块
/// </summary>
public class PlusStartupConfiguration : DictionaryBasedConfig, IPlusStartupConfiguration, IDictionaryBasedConfig public class PlusStartupConfiguration : DictionaryBasedConfig, IPlusStartupConfiguration, IDictionaryBasedConfig
{ {
public IIocManager IocManager public IIocManager IocManager { get; private set; }
{
get;
private set;
}
public Dictionary<Type, Action> ServiceReplaceActions public Dictionary<Type, Action> ServiceReplaceActions { get; private set; }
{
get; public IUnitOfWorkDefaultOptions UnitOfWork { get; private set; }
private set;
} public ICachingConfiguration Caching { get; private set; }
public IValidationConfiguration Validation { get; private set; }
public PlusStartupConfiguration(IIocManager iocManager) public PlusStartupConfiguration(IIocManager iocManager)
{ {
...@@ -25,6 +28,9 @@ namespace Plus.Configuration.Startup ...@@ -25,6 +28,9 @@ namespace Plus.Configuration.Startup
public void Initialize() public void Initialize()
{ {
UnitOfWork = IocManager.Resolve<IUnitOfWorkDefaultOptions>();
Caching = IocManager.Resolve<ICachingConfiguration>();
Validation = IocManager.Resolve<IValidationConfiguration>();
ServiceReplaceActions = new Dictionary<Type, Action>(); ServiceReplaceActions = new Dictionary<Type, Action>();
} }
......
...@@ -5,17 +5,14 @@ using System.Collections.Generic; ...@@ -5,17 +5,14 @@ using System.Collections.Generic;
namespace Plus.Configuration.Startup namespace Plus.Configuration.Startup
{ {
/// <summary>
/// ValidationConfiguration
/// </summary>
public class ValidationConfiguration : IValidationConfiguration public class ValidationConfiguration : IValidationConfiguration
{ {
public List<Type> IgnoredTypes public List<Type> IgnoredTypes { get; }
{
get;
}
public ITypeList<IMethodParameterValidator> Validators public ITypeList<IMethodParameterValidator> Validators { get; }
{
get;
}
public ValidationConfiguration() public ValidationConfiguration()
{ {
......
namespace Plus.Dependency namespace Plus.Dependency
{ {
/// <summary>
/// DisposableDependencyObjectWrapper
/// </summary>
internal class DisposableDependencyObjectWrapper : DisposableDependencyObjectWrapper<object>, IDisposableDependencyObjectWrapper internal class DisposableDependencyObjectWrapper : DisposableDependencyObjectWrapper<object>, IDisposableDependencyObjectWrapper
{ {
public DisposableDependencyObjectWrapper(IIocResolver iocResolver, object obj) public DisposableDependencyObjectWrapper(IIocResolver iocResolver, object obj)
......
...@@ -2,6 +2,10 @@ ...@@ -2,6 +2,10 @@
namespace Plus.Dependency namespace Plus.Dependency
{ {
/// <summary>
/// DisposableDependencyObjectWrapper
/// </summary>
/// <typeparam name="T"></typeparam>
internal class DisposableDependencyObjectWrapper<T> : IDisposableDependencyObjectWrapper<T>, IDisposable internal class DisposableDependencyObjectWrapper<T> : IDisposableDependencyObjectWrapper<T>, IDisposable
{ {
private readonly IIocResolver _iocResolver; private readonly IIocResolver _iocResolver;
......
namespace Plus.Dependency namespace Plus.Dependency
{ {
/// <summary>
/// IDependencyRegistrar
/// </summary>
public interface IDependencyRegistrar public interface IDependencyRegistrar
{ {
void RegisterAssembly(IRegistrationContext context); void RegisterAssembly(IRegistrationContext context);
......
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
namespace Plus.Dependency namespace Plus.Dependency
{ {
/// <summary>
/// IRegistrationContext
/// </summary>
public interface IRegistrationContext public interface IRegistrationContext
{ {
Assembly Assembly { get; } Assembly Assembly { get; }
......
namespace Plus.Dependency namespace Plus.Dependency
{ {
/// <summary>
/// 所有实现此接口的类都自动注册到依赖项注入作为 SingletonDependency
/// </summary>
public interface ISingletonDependency public interface ISingletonDependency
{ {
......
namespace Plus.Dependency namespace Plus.Dependency
{ {
/// <summary>
/// 所有实现此接口的类都自动注册到依赖项注入作为 TransientDependency
/// </summary>
public interface ITransientDependency public interface ITransientDependency
{ {
......
...@@ -9,6 +9,9 @@ using Plus.Runtime.Caching.Configuration; ...@@ -9,6 +9,9 @@ using Plus.Runtime.Caching.Configuration;
namespace Plus.Dependency.Installers namespace Plus.Dependency.Installers
{ {
/// <summary>
/// PlusCoreInstaller
/// </summary>
internal class PlusCoreInstaller : IWindsorInstaller internal class PlusCoreInstaller : IWindsorInstaller
{ {
public void Install(IWindsorContainer container, IConfigurationStore store) public void Install(IWindsorContainer container, IConfigurationStore store)
......
...@@ -7,6 +7,9 @@ using System.Reflection; ...@@ -7,6 +7,9 @@ using System.Reflection;
namespace Plus.Dependency namespace Plus.Dependency
{ {
/// <summary>
/// 该类用于直接执行依赖项注入任务
/// </summary>
public class IocManager : IIocManager, IIocRegistrar, IIocResolver, IDisposable public class IocManager : IIocManager, IIocRegistrar, IIocResolver, IDisposable
{ {
private readonly List<IDependencyRegistrar> _conventionalRegistrars; private readonly List<IDependencyRegistrar> _conventionalRegistrars;
......
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
namespace Plus.Dependency namespace Plus.Dependency
{ {
/// <summary>
/// <see cref="IIocResolver"/> 扩展方法
/// </summary>
public static class IocResolverExtensions public static class IocResolverExtensions
{ {
public static IDisposableDependencyObjectWrapper<T> ResolveAsDisposable<T>(this IIocResolver iocResolver) public static IDisposableDependencyObjectWrapper<T> ResolveAsDisposable<T>(this IIocResolver iocResolver)
......
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
namespace Plus.Dependency namespace Plus.Dependency
{ {
/// <summary>
/// RegistrationContext
/// </summary>
internal class RegistrationContext : IRegistrationContext internal class RegistrationContext : IRegistrationContext
{ {
/// <summary> /// <summary>
...@@ -15,7 +18,7 @@ namespace Plus.Dependency ...@@ -15,7 +18,7 @@ namespace Plus.Dependency
public IIocManager IocManager { get; private set; } public IIocManager IocManager { get; private set; }
/// <summary> /// <summary>
/// /// Registration configuration.
/// </summary> /// </summary>
/// <param name="assembly"></param> /// <param name="assembly"></param>
/// <param name="iocManager"></param> /// <param name="iocManager"></param>
......
...@@ -3,12 +3,19 @@ using System.Collections.Generic; ...@@ -3,12 +3,19 @@ using System.Collections.Generic;
namespace Plus.Domain.Entities namespace Plus.Domain.Entities
{ {
/// <summary>
/// Entity
/// </summary>
[Serializable] [Serializable]
public abstract class Entity : Entity<int>, IEntity public abstract class Entity : Entity<int>, IEntity
{ {
} }
/// <summary>
/// Entity
/// </summary>
/// <typeparam name="TPrimaryKey"></typeparam>
[Serializable] [Serializable]
public abstract class Entity<TPrimaryKey> : IEntity<TPrimaryKey> public abstract class Entity<TPrimaryKey> : IEntity<TPrimaryKey>
{ {
......
...@@ -3,6 +3,9 @@ using System.Runtime.Serialization; ...@@ -3,6 +3,9 @@ using System.Runtime.Serialization;
namespace Plus.Domain.Entities namespace Plus.Domain.Entities
{ {
/// <summary>
/// EntityNotFoundException
/// </summary>
[Serializable] [Serializable]
public class EntityNotFoundException : PlusException public class EntityNotFoundException : PlusException
{ {
......
namespace Plus.Domain.Entities namespace Plus.Domain.Entities
{ {
/// <summary>
/// IEntity
/// </summary>
public interface IEntity : IEntity<int> public interface IEntity : IEntity<int>
{ {
......
namespace Plus.Domain.Entities namespace Plus.Domain.Entities
{ {
/// <summary> /// <summary>
/// Defines interface for base entity type. All entities in the system must implement this interface. /// 为基本实体类型定义接口,系统中的所有实体都必须实现此接口
/// </summary> /// </summary>
/// <typeparam name="TPrimaryKey">Type of the primary key of the entity</typeparam> /// <typeparam name="TPrimaryKey">主键类型</typeparam>
public interface IEntity<TPrimaryKey> public interface IEntity<TPrimaryKey>
{ {
/// <summary> /// <summary>
/// Unique identifier for this entity. /// 主键
/// </summary> /// </summary>
TPrimaryKey Id { get; set; } TPrimaryKey Id { get; set; }
/// <summary> /// <summary>
/// Checks if this entity is transient (not persisted to database and it has not an <see cref="Id"/>). /// True => transient
/// </summary> /// </summary>
/// <returns>True, if this entity is transient</returns> /// <returns></returns>
bool IsTransient(); bool IsTransient();
} }
} }
\ No newline at end of file
...@@ -8,10 +8,10 @@ using System.Threading.Tasks; ...@@ -8,10 +8,10 @@ using System.Threading.Tasks;
namespace Plus.Domain.Repositories namespace Plus.Domain.Repositories
{ {
/// <summary> /// <summary>
/// This interface is implemented by all repositories to ensure implementation of fixed methods. /// 仓储接口
/// </summary> /// </summary>
/// <typeparam name="TEntity">Main Entity type this repository works on</typeparam> /// <typeparam name="TEntity"></typeparam>
/// <typeparam name="TPrimaryKey">Primary key type of the entity</typeparam> /// <typeparam name="TPrimaryKey"></typeparam>
public interface IRepository<TEntity, TPrimaryKey> : IRepository where TEntity : class, IEntity<TPrimaryKey> public interface IRepository<TEntity, TPrimaryKey> : IRepository where TEntity : class, IEntity<TPrimaryKey>
{ {
#region Select/Get/Query #region Select/Get/Query
......
...@@ -7,6 +7,11 @@ using System.Threading.Tasks; ...@@ -7,6 +7,11 @@ using System.Threading.Tasks;
namespace Plus.Domain.Repositories namespace Plus.Domain.Repositories
{ {
/// <summary>
/// ISupportsExplicitLoading
/// </summary>
/// <typeparam name="TEntity"></typeparam>
/// <typeparam name="TPrimaryKey"></typeparam>
public interface ISupportsExplicitLoading<TEntity, TPrimaryKey> where TEntity : class, IEntity<TPrimaryKey> public interface ISupportsExplicitLoading<TEntity, TPrimaryKey> where TEntity : class, IEntity<TPrimaryKey>
{ {
Task EnsureCollectionLoadedAsync<TProperty>(TEntity entity, Expression<Func<TEntity, IEnumerable<TProperty>>> collectionExpression, CancellationToken cancellationToken) where TProperty : class; Task EnsureCollectionLoadedAsync<TProperty>(TEntity entity, Expression<Func<TEntity, IEnumerable<TProperty>>> collectionExpression, CancellationToken cancellationToken) where TProperty : class;
......
namespace Plus.Domain.Repositories namespace Plus.Domain.Repositories
{ {
/// <summary>
/// UnitOfWorkExtensionDataTypes
/// </summary>
internal class UnitOfWorkExtensionDataTypes internal class UnitOfWorkExtensionDataTypes
{ {
public static string HardDelete { get; } = "HardDelete"; public static string HardDelete { get; } = "HardDelete";
......
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
namespace Plus.Domain.Uow namespace Plus.Domain.Uow
{ {
/// <summary>
/// DataFilterConfiguration
/// </summary>
public class DataFilterConfiguration public class DataFilterConfiguration
{ {
public string FilterName { get; } public string FilterName { get; }
......
namespace Plus.Domain.Uow namespace Plus.Domain.Uow
{ {
/// <summary>
/// IUnitOfWorkFilterExecuter
/// </summary>
public interface IUnitOfWorkFilterExecuter public interface IUnitOfWorkFilterExecuter
{ {
void ApplyDisableFilter(IUnitOfWork unitOfWork, string filterName); void ApplyDisableFilter(IUnitOfWork unitOfWork, string filterName);
......
...@@ -6,6 +6,9 @@ using System.Transactions; ...@@ -6,6 +6,9 @@ using System.Transactions;
namespace Plus.Domain.Uow namespace Plus.Domain.Uow
{ {
/// <summary>
/// UnitOfWorkDefaultOptions
/// </summary>
internal class UnitOfWorkDefaultOptions : IUnitOfWorkDefaultOptions internal class UnitOfWorkDefaultOptions : IUnitOfWorkDefaultOptions
{ {
public TransactionScopeOption Scope { get; set; } public TransactionScopeOption Scope { get; set; }
......
using System; using System;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Reflection; using System.Reflection;
using System.Text;
namespace Plus.Domain.Uow namespace Plus.Domain.Uow
{ {
/// <summary>
/// UnitOfWorkDefaultOptionsExtensions
/// </summary>
internal static class UnitOfWorkDefaultOptionsExtensions internal static class UnitOfWorkDefaultOptionsExtensions
{ {
public static UnitOfWorkAttribute GetUnitOfWorkAttributeOrNull(this IUnitOfWorkDefaultOptions unitOfWorkDefaultOptions, MethodInfo methodInfo) public static UnitOfWorkAttribute GetUnitOfWorkAttributeOrNull(this IUnitOfWorkDefaultOptions unitOfWorkDefaultOptions, MethodInfo methodInfo)
...@@ -24,7 +25,7 @@ namespace Plus.Domain.Uow ...@@ -24,7 +25,7 @@ namespace Plus.Domain.Uow
if (unitOfWorkDefaultOptions.IsConventionalUowClass(methodInfo.DeclaringType)) if (unitOfWorkDefaultOptions.IsConventionalUowClass(methodInfo.DeclaringType))
{ {
return new UnitOfWorkAttribute(); //Default return new UnitOfWorkAttribute();
} }
return null; return null;
......
...@@ -90,7 +90,7 @@ namespace Plus.Domain.Uow ...@@ -90,7 +90,7 @@ namespace Plus.Domain.Uow
exception => uow.Dispose() exception => uow.Dispose()
); );
} }
else //Task<TResult> else
{ {
invocation.ReturnValue = InternalAsyncHelper.CallAwaitTaskWithPostActionAndFinallyAndGetResult( invocation.ReturnValue = InternalAsyncHelper.CallAwaitTaskWithPostActionAndFinallyAndGetResult(
invocation.Method.ReturnType.GenericTypeArguments[0], invocation.Method.ReturnType.GenericTypeArguments[0],
......
...@@ -54,8 +54,6 @@ namespace Plus.Domain.Uow ...@@ -54,8 +54,6 @@ namespace Plus.Domain.Uow
internal void FillDefaultsForNonProvidedOptions(IUnitOfWorkDefaultOptions defaultOptions) internal void FillDefaultsForNonProvidedOptions(IUnitOfWorkDefaultOptions defaultOptions)
{ {
//TODO: Do not change options object..?
if (!IsTransactional.HasValue) if (!IsTransactional.HasValue)
{ {
IsTransactional = defaultOptions.IsTransactional; IsTransactional = defaultOptions.IsTransactional;
......
...@@ -6,12 +6,11 @@ using System.Reflection; ...@@ -6,12 +6,11 @@ using System.Reflection;
namespace Plus.Domain.Uow namespace Plus.Domain.Uow
{ {
internal static class UnitOfWorkRegistrar
{
/// <summary> /// <summary>
/// Initializes the registerer. /// UnitOfWorkRegistrar
/// </summary> /// </summary>
/// <param name="iocManager">IOC manager</param> internal static class UnitOfWorkRegistrar
{
public static void Initialize(IIocManager iocManager) public static void Initialize(IIocManager iocManager)
{ {
iocManager.IocContainer.Kernel.ComponentRegistered += (key, handler) => iocManager.IocContainer.Kernel.ComponentRegistered += (key, handler) =>
......
...@@ -4,6 +4,9 @@ using System; ...@@ -4,6 +4,9 @@ using System;
namespace Plus.Event.Bus.Factories namespace Plus.Event.Bus.Factories
{ {
/// <summary>
/// IocHandlerFactory
/// </summary>
public class IocHandlerFactory : IEventHandlerFactory public class IocHandlerFactory : IEventHandlerFactory
{ {
private readonly IIocResolver _iocResolver; private readonly IIocResolver _iocResolver;
......
...@@ -4,6 +4,9 @@ using System.Threading.Tasks; ...@@ -4,6 +4,9 @@ using System.Threading.Tasks;
namespace Plus namespace Plus
{ {
/// <summary>
/// InternalAsyncHelper
/// </summary>
internal static class InternalAsyncHelper internal static class InternalAsyncHelper
{ {
public static async Task AwaitTaskWithFinally(Task actualReturnValue, Action<Exception> finalAction) public static async Task AwaitTaskWithFinally(Task actualReturnValue, Action<Exception> finalAction)
......
namespace Plus.Logging namespace Plus.Logging
{ {
/// <summary>
/// IHasLogSeverity
/// </summary>
public interface IHasLogSeverity public interface IHasLogSeverity
{ {
LogSeverity Severity { get; set; } LogSeverity Severity { get; set; }
......
...@@ -6,6 +6,9 @@ using System.Linq; ...@@ -6,6 +6,9 @@ using System.Linq;
namespace Plus.Logging namespace Plus.Logging
{ {
/// <summary>
/// 帮助类,写日志用
/// </summary>
public static class LogHelper public static class LogHelper
{ {
public static ILogger Logger { get; private set; } public static ILogger Logger { get; private set; }
......
namespace Plus.Logging namespace Plus.Logging
{ {
/// <summary>
/// LogSeverity
/// </summary>
public enum LogSeverity public enum LogSeverity
{ {
Debug, Debug,
......
...@@ -3,6 +3,9 @@ using System; ...@@ -3,6 +3,9 @@ using System;
namespace Plus.Logging namespace Plus.Logging
{ {
/// <summary>
/// LoggerExtensions
/// </summary>
public static class LoggerExtensions public static class LoggerExtensions
{ {
public static void Log(this ILogger logger, LogSeverity severity, string message) public static void Log(this ILogger logger, LogSeverity severity, string message)
......
...@@ -8,6 +8,9 @@ using System.Reflection; ...@@ -8,6 +8,9 @@ using System.Reflection;
namespace Plus.Modules namespace Plus.Modules
{ {
/// <summary>
/// 模块
/// </summary>
public abstract class PlusModule public abstract class PlusModule
{ {
protected internal IIocManager IocManager { get; internal set; } protected internal IIocManager IocManager { get; internal set; }
......
...@@ -4,6 +4,9 @@ using System.Reflection; ...@@ -4,6 +4,9 @@ using System.Reflection;
namespace Plus.Modules namespace Plus.Modules
{ {
/// <summary>
/// PlusModuleInfo
/// </summary>
public class PlusModuleInfo public class PlusModuleInfo
{ {
public Assembly Assembly { get; } public Assembly Assembly { get; }
......
...@@ -3,6 +3,9 @@ using Plus.Dependency; ...@@ -3,6 +3,9 @@ using Plus.Dependency;
namespace Plus namespace Plus
{ {
/// <summary>
/// PlusEngine
/// </summary>
public class PlusEngine public class PlusEngine
{ {
private bool _initialized = false; private bool _initialized = false;
......
...@@ -11,6 +11,9 @@ using System.Reflection; ...@@ -11,6 +11,9 @@ using System.Reflection;
namespace Plus namespace Plus
{ {
/// <summary>
/// PlusStarter
/// </summary>
public class PlusStarter : IDisposable public class PlusStarter : IDisposable
{ {
protected bool IsDisposed; protected bool IsDisposed;
......
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
namespace Plus namespace Plus
{ {
/// <summary>
/// PlusStarterOptions
/// </summary>
public class PlusStarterOptions public class PlusStarterOptions
{ {
public IIocManager IocManager { get; set; } public IIocManager IocManager { get; set; }
......
...@@ -5,6 +5,9 @@ using System.Reflection; ...@@ -5,6 +5,9 @@ using System.Reflection;
namespace Plus.Reflection namespace Plus.Reflection
{ {
/// <summary>
/// AssemblyFinder
/// </summary>
public class AssemblyFinder : IAssemblyFinder public class AssemblyFinder : IAssemblyFinder
{ {
private readonly IPlusModuleManager _moduleManager; private readonly IPlusModuleManager _moduleManager;
......
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
namespace Plus.Reflection namespace Plus.Reflection
{ {
/// <summary>
/// ITypeFinder
/// </summary>
public interface ITypeFinder public interface ITypeFinder
{ {
Type[] Find(Func<Type, bool> predicate); Type[] Find(Func<Type, bool> predicate);
......
...@@ -6,6 +6,9 @@ using System.Reflection; ...@@ -6,6 +6,9 @@ using System.Reflection;
namespace Plus.Reflection namespace Plus.Reflection
{ {
/// <summary>
/// TypeFinder
/// </summary>
public class TypeFinder : ITypeFinder public class TypeFinder : ITypeFinder
{ {
public ILogger Logger { get; set; } public ILogger Logger { get; set; }
......
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
namespace Plus.Runtime.Caching.Configuration namespace Plus.Runtime.Caching.Configuration
{ {
/// <summary>
/// CacheConfigurator
/// </summary>
internal class CacheConfigurator : ICacheConfigurator internal class CacheConfigurator : ICacheConfigurator
{ {
public string CacheName { get; private set; } public string CacheName { get; private set; }
......
...@@ -5,6 +5,9 @@ using System.Collections.Immutable; ...@@ -5,6 +5,9 @@ using System.Collections.Immutable;
namespace Plus.Runtime.Caching.Configuration namespace Plus.Runtime.Caching.Configuration
{ {
/// <summary>
/// CachingConfiguration
/// </summary>
internal class CachingConfiguration : ICachingConfiguration internal class CachingConfiguration : ICachingConfiguration
{ {
public IPlusStartupConfiguration PlusConfiguration { get; private set; } public IPlusStartupConfiguration PlusConfiguration { get; private set; }
......
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
namespace Plus.Runtime.Validation namespace Plus.Runtime.Validation
{ {
/// <summary>
/// DisableValidationAttribute
/// </summary>
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Class | AttributeTargets.Property)] [AttributeUsage(AttributeTargets.Method | AttributeTargets.Class | AttributeTargets.Property)]
public class DisableValidationAttribute : Attribute public class DisableValidationAttribute : Attribute
{ {
......
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
namespace Plus.Runtime.Validation namespace Plus.Runtime.Validation
{ {
/// <summary>
/// EnableValidationAttribute
/// </summary>
[AttributeUsage(AttributeTargets.Method)] [AttributeUsage(AttributeTargets.Method)]
public class EnableValidationAttribute : Attribute public class EnableValidationAttribute : Attribute
{ {
......
...@@ -4,6 +4,9 @@ using System.ComponentModel.DataAnnotations; ...@@ -4,6 +4,9 @@ using System.ComponentModel.DataAnnotations;
namespace Plus.Runtime.Validation.Interception namespace Plus.Runtime.Validation.Interception
{ {
/// <summary>
/// IMethodParameterValidator
/// </summary>
public interface IMethodParameterValidator : ITransientDependency public interface IMethodParameterValidator : ITransientDependency
{ {
IReadOnlyList<ValidationResult> Validate(object validatingObject); IReadOnlyList<ValidationResult> Validate(object validatingObject);
......
...@@ -5,7 +5,7 @@ using Plus.Dependency; ...@@ -5,7 +5,7 @@ using Plus.Dependency;
namespace Plus.Runtime.Validation.Interception namespace Plus.Runtime.Validation.Interception
{ {
/// <summary> /// <summary>
/// 这个拦截器用于拦截类的方法调用,类的方法必须经过验证 /// 这个拦截器用于拦截类的方法调用,类的方法必须经过验证
/// </summary> /// </summary>
public class ValidationInterceptor : IInterceptor public class ValidationInterceptor : IInterceptor
{ {
......
...@@ -6,6 +6,9 @@ using System.Reflection; ...@@ -6,6 +6,9 @@ using System.Reflection;
namespace Plus.Runtime.Validation.Interception namespace Plus.Runtime.Validation.Interception
{ {
/// <summary>
/// ValidationInterceptorRegistrar
/// </summary>
internal static class ValidationInterceptorRegistrar internal static class ValidationInterceptorRegistrar
{ {
public static void Initialize(IIocManager iocManager) public static void Initialize(IIocManager iocManager)
......
...@@ -6,6 +6,9 @@ using System.Runtime.Serialization; ...@@ -6,6 +6,9 @@ using System.Runtime.Serialization;
namespace Plus.Runtime.Validation namespace Plus.Runtime.Validation
{ {
/// <summary>
/// PlusValidationException
/// </summary>
[Serializable] [Serializable]
public class PlusValidationException : PlusException, IHasLogSeverity public class PlusValidationException : PlusException, IHasLogSeverity
{ {
......
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
namespace Plus namespace Plus
{ {
/// <summary>
/// SequentialGuidGenerator
/// </summary>
public class SequentialGuidGenerator : IGuidGenerator public class SequentialGuidGenerator : IGuidGenerator
{ {
public static SequentialGuidGenerator Instance { get; } = new SequentialGuidGenerator(); public static SequentialGuidGenerator Instance { get; } = new SequentialGuidGenerator();
......
...@@ -2,7 +2,10 @@ ...@@ -2,7 +2,10 @@
namespace Plus.Service namespace Plus.Service
{ {
interface IApplicationService : ITransientDependency /// <summary>
/// IApplicationService
/// </summary>
public interface IApplicationService : ITransientDependency
{ {
} }
} }
\ No newline at end of file
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
namespace Plus.Service namespace Plus.Service
{ {
/// <summary>
/// IAvoidDuplicateCrossCuttingConcerns
/// </summary>
public interface IAvoidDuplicateCrossCuttingConcerns public interface IAvoidDuplicateCrossCuttingConcerns
{ {
List<string> AppliedCrossCuttingConcerns { get; } List<string> AppliedCrossCuttingConcerns { get; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment