-
Notifications
You must be signed in to change notification settings - Fork 3
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
2 changed files
with
34 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,33 @@ | ||
using System; | ||
|
||
namespace vm.Aspects | ||
{ | ||
/// <summary> | ||
/// EncryptedAttribute marks a property, field, return value or a parameter as being encrypted. | ||
/// This class cannot be inherited. | ||
/// </summary> | ||
[Serializable] | ||
[AttributeUsage( | ||
AttributeTargets.Field | | ||
AttributeTargets.Property | | ||
AttributeTargets.ReturnValue | | ||
AttributeTargets.Parameter, | ||
AllowMultiple = false, | ||
Inherited = true)] | ||
public sealed class EncryptedAttribute : Attribute | ||
{ | ||
/// <summary> | ||
/// Gets a string that can be used to resolve which cipher should be selected from the DI container. | ||
/// </summary> | ||
public string CipherResolver { get; } | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="EncryptedAttribute"/> class. | ||
/// </summary> | ||
/// <param name="cipherResolver">An optional string that can be used to resolve which cipher should be selected from the DI container.</param> | ||
public EncryptedAttribute(string cipherResolver = null) | ||
{ | ||
CipherResolver = cipherResolver; | ||
} | ||
} | ||
} |
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