Show / Hide Table of Contents

Class OsharpPack

OSharp模块基类

Inheritance
System.Object
OsharpPack
Liuliu.Demo.Web.Startups.CodeGeneratorPack
AspNetCorePack
AspOsharpPack
AuditPackBase
AutoMapperPack
CodeGenerationPack
EntityInfoPack
OsharpCorePack
DependencyPack
EntityFrameworkCorePackBase
MigrationPackBase<TDbContext>
EventBusPack
Log4NetPack
RedisPackCore
SecurityPackBase<TSecurityManager, TFunctionAuthorization, TFunctionAuthCache, TDataAuthCache, TModuleHandler, TFunction, TFunctionInputDto, TEntityInfo, TEntityInfoInputDto, TModule, TModuleInputDto, TModuleKey, TModuleFunction, TModuleRole, TModuleUser, TEntityRole, TEntityRoleInputDto, TRoleKey, TUserKey>
SystemPack
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: System.Dynamic.ExpandoObject
Assembly: OSharp.dll
Syntax
public abstract class OsharpPack

Properties

IsEnabled

获取 是否已可用

Declaration
public bool IsEnabled { get; protected set; }
Property Value
System.Boolean

Level

获取 模块级别,级别越小越先启动

Declaration
public virtual PackLevel Level { get; }
Property Value
PackLevel

Order

获取 模块启动顺序,模块启动的顺序先按级别启动,同一级别内部再按此顺序启动, 级别默认为0,表示无依赖,需要在同级别有依赖顺序的时候,再重写为>0的顺序值

Declaration
public virtual int Order { get; }
Property Value
System.Int32

Methods

AddServices(IServiceCollection)

将模块服务添加到依赖注入服务容器中

Declaration
public virtual IServiceCollection AddServices(IServiceCollection services)
Parameters
Microsoft.Extensions.DependencyInjection.IServiceCollection services

依赖注入服务容器

Returns
Microsoft.Extensions.DependencyInjection.IServiceCollection

UsePack(IServiceProvider)

应用模块服务

Declaration
public virtual void UsePack(IServiceProvider provider)
Parameters
System.IServiceProvider provider

服务提供者

Extension Methods

EntityExtensions.CheckICreatedTime<TEntity, TKey>(TEntity)
EntityExtensions.CheckICreationAudited<TEntity, TKey, TUserKey>(TEntity, IPrincipal)
EntityExtensions.CheckIUpdateAudited<TEntity, TKey, TUserKey>(TEntity, IPrincipal)
ObjectExtensions.CastTo(Object, Type)
ObjectExtensions.CastTo<T>(Object)
ObjectExtensions.CastTo<T>(Object, T)
ObjectExtensions.IsIn<T>(T, T[])
ObjectExtensions.ToDynamic(Object)
ObjectExtensions.DeepClone<T>(T)
ParamterCheckExtensions.Required<T>(T, Func<T, Boolean>, String)
ParamterCheckExtensions.Required<T, TException>(T, Func<T, Boolean>, String)
ParamterCheckExtensions.CheckNotNull<T>(T, String)
TryCatchExtensions.TryCatch<T>(T, Action<T>, Action<Exception>, Action<T>)
TryCatchExtensions.TryCatch<T>(T, Action<T>, Action<Exception>)
TryCatchExtensions.TryCatch<T, TResult>(T, Func<T, TResult>, Action<Exception>, Action<T>)
TryCatchExtensions.TryCatch<T, TResult>(T, Func<T, TResult>, Action<Exception>)
TryCatchExtensions.TryFinally<T>(T, Action<T>, Action<T>)
JsonExtensions.ToJsonString(Object, Boolean, Boolean)
MapperExtensions.MapTo<TTarget>(Object)
MapperExtensions.MapTo<TSource, TTarget>(TSource, TTarget)
LockExtensions.Locking(Object, Action)
LockExtensions.Locking<T>(T, Action<T>)
LockExtensions.Locking<TResult>(Object, Func<TResult>)
LockExtensions.Locking<TSource, TResult>(TSource, Func<TSource, TResult>)
Back to top Generated by DocFX