diff options
Diffstat (limited to 'src/DotNetOAuth/Messaging/MessagePartAttribute.cs')
-rw-r--r-- | src/DotNetOAuth/Messaging/MessagePartAttribute.cs | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/DotNetOAuth/Messaging/MessagePartAttribute.cs b/src/DotNetOAuth/Messaging/MessagePartAttribute.cs new file mode 100644 index 0000000..a8de784 --- /dev/null +++ b/src/DotNetOAuth/Messaging/MessagePartAttribute.cs @@ -0,0 +1,32 @@ +//-----------------------------------------------------------------------
+// <copyright file="MessagePartAttribute.cs" company="Andrew Arnott">
+// Copyright (c) Andrew Arnott. All rights reserved.
+// </copyright>
+//-----------------------------------------------------------------------
+
+namespace DotNetOAuth.Messaging {
+ using System;
+ using System.Net.Security;
+ using System.Reflection;
+
+ [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, Inherited = true, AllowMultiple = false)]
+ internal sealed class MessagePartAttribute : Attribute {
+ private string name;
+
+ internal MessagePartAttribute() {
+ }
+
+ internal MessagePartAttribute(string name) {
+ this.Name = name;
+ }
+
+ public string Name {
+ get { return this.name; }
+ set { this.name = string.IsNullOrEmpty(value) ? null : value; }
+ }
+
+ public ProtectionLevel RequiredProtection { get; set; }
+
+ public bool IsRequired { get; set; }
+ }
+}
|