blob: a81e2f9dca793d426c9415f0dc3d51bc88e0606d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
using System.Runtime.Serialization;
namespace DotNetOAuth.Test.Mocks {
[DataContract(Namespace = Protocol.DataContractNamespace)]
class TestMessage : IProtocolMessage {
[DataMember(Name = "age")]
public int Age { get; set; }
[DataMember]
public string Name { get; set; }
[DataMember]
public string EmptyMember { get; set; }
#region IProtocolMessage Members
void IProtocolMessage.EnsureValidMessage() {
if (EmptyMember != null || Age < 0) {
throw new ProtocolException();
}
}
#endregion
}
}
|