Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
97 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace Wodsoft.ComBoost | ||
{ | ||
/// <summary> | ||
/// 用于标注领域方法需要的选项。 | ||
/// </summary> | ||
[AttributeUsage(AttributeTargets.Method, Inherited = true)] | ||
public class OptionRequiredAttribute : Attribute | ||
{ | ||
/// <summary> | ||
/// 领域方法需要的服务类型。 | ||
/// </summary> | ||
/// <param name="type"></param> | ||
public OptionRequiredAttribute(Type type) | ||
{ | ||
Type = type; | ||
} | ||
|
||
/// <summary> | ||
/// 获取值类型。 | ||
/// </summary> | ||
public Type Type { get; private set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace Wodsoft.ComBoost | ||
{ | ||
/// <summary> | ||
/// 用于标注领域方法需要的服务。 | ||
/// </summary> | ||
[AttributeUsage(AttributeTargets.Method, Inherited = true)] | ||
public class ServiceRequiredAttribute : Attribute | ||
{ | ||
/// <summary> | ||
/// 领域方法需要的服务类型。 | ||
/// </summary> | ||
/// <param name="type"></param> | ||
public ServiceRequiredAttribute(Type type) | ||
{ | ||
Type = type; | ||
} | ||
|
||
/// <summary> | ||
/// 获取值类型。 | ||
/// </summary> | ||
public Type Type { get; private set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace Wodsoft.ComBoost | ||
{ | ||
/// <summary> | ||
/// 用于标注领域方法需要的值。 | ||
/// </summary> | ||
[AttributeUsage(AttributeTargets.Method, Inherited = true)] | ||
public class ValueRequiredAttribute : Attribute | ||
{ | ||
/// <summary> | ||
/// 领域方法需要的值名称。 | ||
/// </summary> | ||
/// <param name="name">值名称。</param> | ||
public ValueRequiredAttribute(string name) | ||
{ | ||
Name = name; | ||
} | ||
|
||
/// <summary> | ||
/// 领域方法需要的值名称与类型。 | ||
/// </summary> | ||
/// <param name="type"></param> | ||
/// <param name="name">值名称。</param> | ||
public ValueRequiredAttribute(Type type, string name) | ||
: this(name) | ||
{ | ||
Type = type; | ||
} | ||
|
||
/// <summary> | ||
/// 获取值名称。 | ||
/// </summary> | ||
public string Name { get; private set; } | ||
|
||
/// <summary> | ||
/// 获取值类型。 | ||
/// </summary> | ||
public Type Type { get; private set; } | ||
} | ||
} |