Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
netcoreplus
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tsai
netcoreplus
Commits
42bb457c
Commit
42bb457c
authored
May 16, 2019
by
阿星Plus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加啊代码注释
parent
1a86b42b
Changes
61
Show whitespace changes
Inline
Side-by-side
Showing
61 changed files
with
249 additions
and
62 deletions
+249
-62
ActionOutput.cs
src/Plus/ActionOutput.cs
+3
-3
ActionOutputOfT.cs
src/Plus/ActionOutputOfT.cs
+2
-2
PlusCrossCuttingConcerns.cs
src/Plus/Aspects/PlusCrossCuttingConcerns.cs
+3
-1
ITypeList.cs
src/Plus/Collections/ITypeList.cs
+20
-0
TypeList.cs
src/Plus/Collections/TypeList.cs
+21
-0
DictionaryBasedConfig.cs
src/Plus/Configuration/DictionaryBasedConfig.cs
+4
-5
IDictionaryBasedConfig.cs
src/Plus/Configuration/IDictionaryBasedConfig.cs
+3
-0
EventBusConfiguration.cs
src/Plus/Configuration/Startup/EventBusConfiguration.cs
+3
-0
IPlusStartupConfiguration.cs
src/Plus/Configuration/Startup/IPlusStartupConfiguration.cs
+14
-12
IValidationConfiguration.cs
src/Plus/Configuration/Startup/IValidationConfiguration.cs
+3
-0
PlusStartupConfiguration.cs
src/Plus/Configuration/Startup/PlusStartupConfiguration.cs
+16
-10
ValidationConfiguration.cs
src/Plus/Configuration/Startup/ValidationConfiguration.cs
+5
-8
DisposableDependencyObjectWrapper.cs
src/Plus/Dependency/DisposableDependencyObjectWrapper.cs
+3
-0
DisposableDependencyObjectWrapperOfT.cs
src/Plus/Dependency/DisposableDependencyObjectWrapperOfT.cs
+4
-0
IDependencyRegistrar.cs
src/Plus/Dependency/IDependencyRegistrar.cs
+3
-0
IRegistrationContext.cs
src/Plus/Dependency/IRegistrationContext.cs
+3
-0
ISingletonDependency.cs
src/Plus/Dependency/ISingletonDependency.cs
+3
-0
ITransientDependency.cs
src/Plus/Dependency/ITransientDependency.cs
+3
-0
PlusCoreInstaller.cs
src/Plus/Dependency/Installers/PlusCoreInstaller.cs
+3
-0
IocManager.cs
src/Plus/Dependency/IocManager.cs
+3
-0
IocResolverExtensions.cs
src/Plus/Dependency/IocResolverExtensions.cs
+3
-0
RegistrationContext.cs
src/Plus/Dependency/RegistrationContext.cs
+4
-1
Entity.cs
src/Plus/Domain/Entities/Entity.cs
+7
-0
EntityNotFoundException.cs
src/Plus/Domain/Entities/EntityNotFoundException.cs
+3
-0
IEntity.cs
src/Plus/Domain/Entities/IEntity.cs
+3
-0
IEntityOfTPrimaryKey.cs
src/Plus/Domain/Entities/IEntityOfTPrimaryKey.cs
+5
-5
IRepositoryOfTEntityAndTPrimaryKey.cs
...Domain/Repositories/IRepositoryOfTEntityAndTPrimaryKey.cs
+3
-3
ISupportsExplicitLoading.cs
src/Plus/Domain/Repositories/ISupportsExplicitLoading.cs
+5
-0
UnitOfWorkExtensionDataTypes.cs
src/Plus/Domain/Repositories/UnitOfWorkExtensionDataTypes.cs
+3
-0
DataFilterConfiguration.cs
src/Plus/Domain/Uow/DataFilterConfiguration.cs
+3
-0
IUnitOfWorkFilterExecuter.cs
src/Plus/Domain/Uow/IUnitOfWorkFilterExecuter.cs
+3
-0
UnitOfWorkDefaultOptions.cs
src/Plus/Domain/Uow/UnitOfWorkDefaultOptions.cs
+3
-0
UnitOfWorkDefaultOptionsExtensions.cs
src/Plus/Domain/Uow/UnitOfWorkDefaultOptionsExtensions.cs
+4
-3
UnitOfWorkInterceptor.cs
src/Plus/Domain/Uow/UnitOfWorkInterceptor.cs
+1
-1
UnitOfWorkOptions.cs
src/Plus/Domain/Uow/UnitOfWorkOptions.cs
+0
-2
UnitOfWorkRegistrar.cs
src/Plus/Domain/Uow/UnitOfWorkRegistrar.cs
+3
-4
IocHandlerFactory.cs
src/Plus/Event/Bus/Factories/IocHandlerFactory.cs
+3
-0
InternalAsyncHelper.cs
src/Plus/InternalAsyncHelper.cs
+3
-0
IHasLogSeverity.cs
src/Plus/Logging/IHasLogSeverity.cs
+3
-0
LogHelper.cs
src/Plus/Logging/LogHelper.cs
+3
-0
LogSeverity.cs
src/Plus/Logging/LogSeverity.cs
+3
-0
LoggerExtensions.cs
src/Plus/Logging/LoggerExtensions.cs
+3
-0
PlusModule.cs
src/Plus/Modules/PlusModule.cs
+3
-0
PlusModuleInfo.cs
src/Plus/Modules/PlusModuleInfo.cs
+3
-0
PlusEngine.cs
src/Plus/PlusEngine.cs
+3
-0
PlusStarter.cs
src/Plus/PlusStarter.cs
+3
-0
PlusStarterOptions.cs
src/Plus/PlusStarterOptions.cs
+3
-0
AssemblyFinder.cs
src/Plus/Reflection/AssemblyFinder.cs
+3
-0
ITypeFinder.cs
src/Plus/Reflection/ITypeFinder.cs
+3
-0
TypeFinder.cs
src/Plus/Reflection/TypeFinder.cs
+3
-0
CacheConfigurator.cs
src/Plus/Runtime/Caching/Configuration/CacheConfigurator.cs
+3
-0
CachingConfiguration.cs
...lus/Runtime/Caching/Configuration/CachingConfiguration.cs
+3
-0
DisableValidationAttribute.cs
src/Plus/Runtime/Validation/DisableValidationAttribute.cs
+3
-0
EnableValidationAttribute.cs
src/Plus/Runtime/Validation/EnableValidationAttribute.cs
+3
-0
IMethodParameterValidator.cs
...time/Validation/Interception/IMethodParameterValidator.cs
+3
-0
ValidationInterceptor.cs
.../Runtime/Validation/Interception/ValidationInterceptor.cs
+1
-1
ValidationInterceptorRegistrar.cs
...Validation/Interception/ValidationInterceptorRegistrar.cs
+3
-0
PlusValidationException.cs
src/Plus/Runtime/Validation/PlusValidationException.cs
+3
-0
SequentialGuidGenerator.cs
src/Plus/SequentialGuidGenerator.cs
+3
-0
IApplicationService.cs
src/Plus/Service/IApplicationService.cs
+4
-1
IAvoidDuplicateCrossCuttingConcerns.cs
src/Plus/Service/IAvoidDuplicateCrossCuttingConcerns.cs
+3
-0
No files found.
src/Plus/ActionOutput.cs
View file @
42bb457c
...
@@ -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
;
}
...
...
src/Plus/ActionOutputOfT.cs
View file @
42bb457c
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
;
}
}
}
...
...
src/Plus/Aspects/PlusCrossCuttingConcerns.cs
View file @
42bb457c
...
@@ -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
)
...
...
src/Plus/Collections/ITypeList.cs
View file @
42bb457c
...
@@ -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
src/Plus/Collections/TypeList.cs
View file @
42bb457c
...
@@ -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
>();
...
...
src/Plus/Configuration/DictionaryBasedConfig.cs
View file @
42bb457c
...
@@ -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
]
{
{
...
...
src/Plus/Configuration/IDictionaryBasedConfig.cs
View file @
42bb457c
...
@@ -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
);
...
...
src/Plus/Configuration/Startup/EventBusConfiguration.cs
View file @
42bb457c
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
;
}
...
...
src/Plus/Configuration/Startup/IPlusStartupConfiguration.cs
View file @
42bb457c
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
src/Plus/Configuration/Startup/IValidationConfiguration.cs
View file @
42bb457c
...
@@ -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
;
}
...
...
src/Plus/Configuration/Startup/PlusStartupConfiguration.cs
View file @
42bb457c
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
>();
}
}
...
...
src/Plus/Configuration/Startup/ValidationConfiguration.cs
View file @
42bb457c
...
@@ -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
()
{
{
...
...
src/Plus/Dependency/DisposableDependencyObjectWrapper.cs
View file @
42bb457c
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
)
...
...
src/Plus/Dependency/DisposableDependencyObjectWrapperOfT.cs
View file @
42bb457c
...
@@ -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
;
...
...
src/Plus/Dependency/IDependencyRegistrar.cs
View file @
42bb457c
namespace
Plus.Dependency
namespace
Plus.Dependency
{
{
/// <summary>
/// IDependencyRegistrar
/// </summary>
public
interface
IDependencyRegistrar
public
interface
IDependencyRegistrar
{
{
void
RegisterAssembly
(
IRegistrationContext
context
);
void
RegisterAssembly
(
IRegistrationContext
context
);
...
...
src/Plus/Dependency/IRegistrationContext.cs
View file @
42bb457c
...
@@ -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
;
}
...
...
src/Plus/Dependency/ISingletonDependency.cs
View file @
42bb457c
namespace
Plus.Dependency
namespace
Plus.Dependency
{
{
/// <summary>
/// 所有实现此接口的类都自动注册到依赖项注入作为 SingletonDependency
/// </summary>
public
interface
ISingletonDependency
public
interface
ISingletonDependency
{
{
...
...
src/Plus/Dependency/ITransientDependency.cs
View file @
42bb457c
namespace
Plus.Dependency
namespace
Plus.Dependency
{
{
/// <summary>
/// 所有实现此接口的类都自动注册到依赖项注入作为 TransientDependency
/// </summary>
public
interface
ITransientDependency
public
interface
ITransientDependency
{
{
...
...
src/Plus/Dependency/Installers/PlusCoreInstaller.cs
View file @
42bb457c
...
@@ -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
)
...
...
src/Plus/Dependency/IocManager.cs
View file @
42bb457c
...
@@ -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
;
...
...
src/Plus/Dependency/IocResolverExtensions.cs
View file @
42bb457c
...
@@ -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
)
...
...
src/Plus/Dependency/RegistrationContext.cs
View file @
42bb457c
...
@@ -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>
...
...
src/Plus/Domain/Entities/Entity.cs
View file @
42bb457c
...
@@ -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
>
{
{
...
...
src/Plus/Domain/Entities/EntityNotFoundException.cs
View file @
42bb457c
...
@@ -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
{
{
...
...
src/Plus/Domain/Entities/IEntity.cs
View file @
42bb457c
namespace
Plus.Domain.Entities
namespace
Plus.Domain.Entities
{
{
/// <summary>
/// IEntity
/// </summary>
public
interface
IEntity
:
IEntity
<
int
>
public
interface
IEntity
:
IEntity
<
int
>
{
{
...
...
src/Plus/Domain/Entities/IEntityOfTPrimaryKey.cs
View file @
42bb457c
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
src/Plus/Domain/Repositories/IRepositoryOfTEntityAndTPrimaryKey.cs
View file @
42bb457c
...
@@ -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
...
...
src/Plus/Domain/Repositories/ISupportsExplicitLoading.cs
View file @
42bb457c
...
@@ -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
;
...
...
src/Plus/Domain/Repositories/UnitOfWorkExtensionDataTypes.cs
View file @
42bb457c
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"
;
...
...
src/Plus/Domain/Uow/DataFilterConfiguration.cs
View file @
42bb457c
...
@@ -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
;
}
...
...
src/Plus/Domain/Uow/IUnitOfWorkFilterExecuter.cs
View file @
42bb457c
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
);
...
...
src/Plus/Domain/Uow/UnitOfWorkDefaultOptions.cs
View file @
42bb457c
...
@@ -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
;
}
...
...
src/Plus/Domain/Uow/UnitOfWorkDefaultOptionsExtensions.cs
View file @
42bb457c
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
;
...
...
src/Plus/Domain/Uow/UnitOfWorkInterceptor.cs
View file @
42bb457c
...
@@ -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
],
...
...
src/Plus/Domain/Uow/UnitOfWorkOptions.cs
View file @
42bb457c
...
@@ -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
;
...
...
src/Plus/Domain/Uow/UnitOfWorkRegistrar.cs
View file @
42bb457c
...
@@ -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
)
=>
...
...
src/Plus/Event/Bus/Factories/IocHandlerFactory.cs
View file @
42bb457c
...
@@ -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
;
...
...
src/Plus/InternalAsyncHelper.cs
View file @
42bb457c
...
@@ -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
)
...
...
src/Plus/Logging/IHasLogSeverity.cs
View file @
42bb457c
namespace
Plus.Logging
namespace
Plus.Logging
{
{
/// <summary>
/// IHasLogSeverity
/// </summary>
public
interface
IHasLogSeverity
public
interface
IHasLogSeverity
{
{
LogSeverity
Severity
{
get
;
set
;
}
LogSeverity
Severity
{
get
;
set
;
}
...
...
src/Plus/Logging/LogHelper.cs
View file @
42bb457c
...
@@ -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
;
}
...
...
src/Plus/Logging/LogSeverity.cs
View file @
42bb457c
namespace
Plus.Logging
namespace
Plus.Logging
{
{
/// <summary>
/// LogSeverity
/// </summary>
public
enum
LogSeverity
public
enum
LogSeverity
{
{
Debug
,
Debug
,
...
...
src/Plus/Logging/LoggerExtensions.cs
View file @
42bb457c
...
@@ -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
)
...
...
src/Plus/Modules/PlusModule.cs
View file @
42bb457c
...
@@ -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
;
}
...
...
src/Plus/Modules/PlusModuleInfo.cs
View file @
42bb457c
...
@@ -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
;
}
...
...
src/Plus/PlusEngine.cs
View file @
42bb457c
...
@@ -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
;
...
...
src/Plus/PlusStarter.cs
View file @
42bb457c
...
@@ -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
;
...
...
src/Plus/PlusStarterOptions.cs
View file @
42bb457c
...
@@ -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
;
}
...
...
src/Plus/Reflection/AssemblyFinder.cs
View file @
42bb457c
...
@@ -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
;
...
...
src/Plus/Reflection/ITypeFinder.cs
View file @
42bb457c
...
@@ -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
);
...
...
src/Plus/Reflection/TypeFinder.cs
View file @
42bb457c
...
@@ -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
;
}
...
...
src/Plus/Runtime/Caching/Configuration/CacheConfigurator.cs
View file @
42bb457c
...
@@ -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
;
}
...
...
src/Plus/Runtime/Caching/Configuration/CachingConfiguration.cs
View file @
42bb457c
...
@@ -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
;
}
...
...
src/Plus/Runtime/Validation/DisableValidationAttribute.cs
View file @
42bb457c
...
@@ -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
{
{
...
...
src/Plus/Runtime/Validation/EnableValidationAttribute.cs
View file @
42bb457c
...
@@ -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
{
{
...
...
src/Plus/Runtime/Validation/Interception/IMethodParameterValidator.cs
View file @
42bb457c
...
@@ -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
);
...
...
src/Plus/Runtime/Validation/Interception/ValidationInterceptor.cs
View file @
42bb457c
...
@@ -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
{
{
...
...
src/Plus/Runtime/Validation/Interception/ValidationInterceptorRegistrar.cs
View file @
42bb457c
...
@@ -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
)
...
...
src/Plus/Runtime/Validation/PlusValidationException.cs
View file @
42bb457c
...
@@ -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
{
{
...
...
src/Plus/SequentialGuidGenerator.cs
View file @
42bb457c
...
@@ -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
();
...
...
src/Plus/Service/IApplicationService.cs
View file @
42bb457c
...
@@ -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
src/Plus/Service/IAvoidDuplicateCrossCuttingConcerns.cs
View file @
42bb457c
...
@@ -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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment