blob: 4f27b5bf500916b5961e066603453d71aa462d72 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
using System.Runtime.Serialization;
using System;
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; }
[DataMember]
public Uri Location { get; set; }
#region IProtocolMessage Members
void IProtocolMessage.EnsureValidMessage() {
if (EmptyMember != null || Age < 0) {
throw new ProtocolException();
}
}
#endregion
}
}
|