diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2008-12-19 16:24:25 -0800 |
---|---|---|
committer | Andrew <andrewarnott@gmail.com> | 2008-12-19 16:24:25 -0800 |
commit | 89c77e698e1e03f157db71da66576ef564c918ae (patch) | |
tree | aa0e5c871b210d8a792d1847cb76ae283e772aab /src/DotNetOpenAuth.Test/Mocks/TestBaseMessage.cs | |
parent | 77f5b1550164c409ee6b4e41c372037832d112c3 (diff) | |
download | DotNetOpenAuth-89c77e698e1e03f157db71da66576ef564c918ae.zip DotNetOpenAuth-89c77e698e1e03f157db71da66576ef564c918ae.tar.gz DotNetOpenAuth-89c77e698e1e03f157db71da66576ef564c918ae.tar.bz2 |
Lots of work toward extensions.
Diffstat (limited to 'src/DotNetOpenAuth.Test/Mocks/TestBaseMessage.cs')
-rw-r--r-- | src/DotNetOpenAuth.Test/Mocks/TestBaseMessage.cs | 130 |
1 files changed, 65 insertions, 65 deletions
diff --git a/src/DotNetOpenAuth.Test/Mocks/TestBaseMessage.cs b/src/DotNetOpenAuth.Test/Mocks/TestBaseMessage.cs index 212907f..49b11bf 100644 --- a/src/DotNetOpenAuth.Test/Mocks/TestBaseMessage.cs +++ b/src/DotNetOpenAuth.Test/Mocks/TestBaseMessage.cs @@ -1,65 +1,65 @@ -//----------------------------------------------------------------------- -// <copyright file="TestBaseMessage.cs" company="Andrew Arnott"> -// Copyright (c) Andrew Arnott. All rights reserved. -// </copyright> -//----------------------------------------------------------------------- - -namespace DotNetOpenAuth.Test.Mocks { - using System; - using System.Collections.Generic; - using System.Runtime.Serialization; - using DotNetOpenAuth.Messaging; - using DotNetOpenAuth.Messaging.Reflection; - - internal interface IBaseMessageExplicitMembers { - string ExplicitProperty { get; set; } - } - - internal class TestBaseMessage : IProtocolMessage, IBaseMessageExplicitMembers { - private Dictionary<string, string> extraData = new Dictionary<string, string>(); - private bool incoming; - - [MessagePart("age", IsRequired = true)] - public int Age { get; set; } - - [MessagePart] - public string Name { get; set; } - - [MessagePart("explicit")] - string IBaseMessageExplicitMembers.ExplicitProperty { get; set; } - - Version IProtocolMessage.ProtocolVersion { - get { return new Version(1, 0); } - } - - MessageProtections IProtocolMessage.RequiredProtection { - get { return MessageProtections.None; } - } - - MessageTransport IProtocolMessage.Transport { - get { return MessageTransport.Indirect; } - } - - IDictionary<string, string> IProtocolMessage.ExtraData { - get { return this.extraData; } - } - - bool IProtocolMessage.Incoming { - get { return this.incoming; } - } - - internal string PrivatePropertyAccessor { - get { return this.PrivateProperty; } - set { this.PrivateProperty = value; } - } - - [MessagePart("private")] - private string PrivateProperty { get; set; } - - void IProtocolMessage.EnsureValidMessage() { } - - internal void SetAsIncoming() { - this.incoming = true; - } - } -} +//-----------------------------------------------------------------------
+// <copyright file="TestBaseMessage.cs" company="Andrew Arnott">
+// Copyright (c) Andrew Arnott. All rights reserved.
+// </copyright>
+//-----------------------------------------------------------------------
+
+namespace DotNetOpenAuth.Test.Mocks {
+ using System;
+ using System.Collections.Generic;
+ using System.Runtime.Serialization;
+ using DotNetOpenAuth.Messaging;
+ using DotNetOpenAuth.Messaging.Reflection;
+
+ internal interface IBaseMessageExplicitMembers {
+ string ExplicitProperty { get; set; }
+ }
+
+ internal class TestBaseMessage : IProtocolMessage, IBaseMessageExplicitMembers {
+ private Dictionary<string, string> extraData = new Dictionary<string, string>();
+ private bool incoming;
+
+ [MessagePart("age", IsRequired = true)]
+ public int Age { get; set; }
+
+ [MessagePart]
+ public string Name { get; set; }
+
+ [MessagePart("explicit")]
+ string IBaseMessageExplicitMembers.ExplicitProperty { get; set; }
+
+ Version IMessage.Version {
+ get { return new Version(1, 0); }
+ }
+
+ MessageProtections IProtocolMessage.RequiredProtection {
+ get { return MessageProtections.None; }
+ }
+
+ MessageTransport IProtocolMessage.Transport {
+ get { return MessageTransport.Indirect; }
+ }
+
+ IDictionary<string, string> IMessage.ExtraData {
+ get { return this.extraData; }
+ }
+
+ bool IMessage.Incoming {
+ get { return this.incoming; }
+ }
+
+ internal string PrivatePropertyAccessor {
+ get { return this.PrivateProperty; }
+ set { this.PrivateProperty = value; }
+ }
+
+ [MessagePart("private")]
+ private string PrivateProperty { get; set; }
+
+ void IMessage.EnsureValidMessage() { }
+
+ internal void SetAsIncoming() {
+ this.incoming = true;
+ }
+ }
+}
|