diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2009-01-09 21:03:29 -0800 |
---|---|---|
committer | Andrew <andrewarnott@gmail.com> | 2009-01-09 21:03:29 -0800 |
commit | d8abcbe507383d3510ee45ed19f6503c60d7d63b (patch) | |
tree | 64d656b165aed099ef68881c98082d552f5af2e4 /src/DotNetOpenAuth.Test/Mocks/TestMessage.cs | |
parent | 588d1384431e23827921124bd438569231cbdfa7 (diff) | |
download | DotNetOpenAuth-d8abcbe507383d3510ee45ed19f6503c60d7d63b.zip DotNetOpenAuth-d8abcbe507383d3510ee45ed19f6503c60d7d63b.tar.gz DotNetOpenAuth-d8abcbe507383d3510ee45ed19f6503c60d7d63b.tar.bz2 |
CRLF -> LF line endings change to all .cs files.
Diffstat (limited to 'src/DotNetOpenAuth.Test/Mocks/TestMessage.cs')
-rw-r--r-- | src/DotNetOpenAuth.Test/Mocks/TestMessage.cs | 146 |
1 files changed, 73 insertions, 73 deletions
diff --git a/src/DotNetOpenAuth.Test/Mocks/TestMessage.cs b/src/DotNetOpenAuth.Test/Mocks/TestMessage.cs index 68df8bb..7da6ff3 100644 --- a/src/DotNetOpenAuth.Test/Mocks/TestMessage.cs +++ b/src/DotNetOpenAuth.Test/Mocks/TestMessage.cs @@ -1,73 +1,73 @@ -//-----------------------------------------------------------------------
-// <copyright file="TestMessage.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 abstract class TestMessage : IDirectResponseProtocolMessage {
- private MessageTransport transport;
- private Dictionary<string, string> extraData = new Dictionary<string, string>();
-
- protected TestMessage()
- : this(MessageTransport.Direct) {
- }
-
- protected TestMessage(MessageTransport transport) {
- this.transport = transport;
- }
-
- [MessagePart("age", IsRequired = true)]
- public int Age { get; set; }
- [MessagePart("Name")]
- public string Name { get; set; }
- [MessagePart]
- public string EmptyMember { get; set; }
- [MessagePart(null)] // null name tests that Location is still the name.
- public Uri Location { get; set; }
- [MessagePart(IsRequired = true)]
- public DateTime Timestamp { get; set; }
-
- #region IProtocolMessage Properties
-
- Version IMessage.Version {
- get { return new Version(1, 0); }
- }
-
- MessageProtections IProtocolMessage.RequiredProtection {
- get { return MessageProtections.None; }
- }
-
- MessageTransport IProtocolMessage.Transport {
- get { return this.transport; }
- }
-
- IDictionary<string, string> IMessage.ExtraData {
- get { return this.extraData; }
- }
-
- #endregion
-
- #region IDirectResponseProtocolMessage Members
-
- public IDirectedProtocolMessage OriginatingRequest { get; set; }
-
- #endregion
-
- #region IMessage Methods
-
- void IMessage.EnsureValidMessage() {
- if (this.EmptyMember != null || this.Age < 0) {
- throw new ProtocolException();
- }
- }
-
- #endregion
- }
-}
+//----------------------------------------------------------------------- +// <copyright file="TestMessage.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 abstract class TestMessage : IDirectResponseProtocolMessage { + private MessageTransport transport; + private Dictionary<string, string> extraData = new Dictionary<string, string>(); + + protected TestMessage() + : this(MessageTransport.Direct) { + } + + protected TestMessage(MessageTransport transport) { + this.transport = transport; + } + + [MessagePart("age", IsRequired = true)] + public int Age { get; set; } + [MessagePart("Name")] + public string Name { get; set; } + [MessagePart] + public string EmptyMember { get; set; } + [MessagePart(null)] // null name tests that Location is still the name. + public Uri Location { get; set; } + [MessagePart(IsRequired = true)] + public DateTime Timestamp { get; set; } + + #region IProtocolMessage Properties + + Version IMessage.Version { + get { return new Version(1, 0); } + } + + MessageProtections IProtocolMessage.RequiredProtection { + get { return MessageProtections.None; } + } + + MessageTransport IProtocolMessage.Transport { + get { return this.transport; } + } + + IDictionary<string, string> IMessage.ExtraData { + get { return this.extraData; } + } + + #endregion + + #region IDirectResponseProtocolMessage Members + + public IDirectedProtocolMessage OriginatingRequest { get; set; } + + #endregion + + #region IMessage Methods + + void IMessage.EnsureValidMessage() { + if (this.EmptyMember != null || this.Age < 0) { + throw new ProtocolException(); + } + } + + #endregion + } +} |