summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.Core/Messaging/Reflection/MessagePart.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2012-12-26 18:07:32 -0800
committerAndrew Arnott <andrewarnott@gmail.com>2012-12-26 18:07:32 -0800
commit002ce0e39af3b684ce6060dce60805e3333420fa (patch)
tree2c9aace23e08d17ed03a3732a5fa4a549463f811 /src/DotNetOpenAuth.Core/Messaging/Reflection/MessagePart.cs
parent4bf6dfa05ab5ba2d7ebff157dc4a1a85dae42125 (diff)
downloadDotNetOpenAuth-002ce0e39af3b684ce6060dce60805e3333420fa.zip
DotNetOpenAuth-002ce0e39af3b684ce6060dce60805e3333420fa.tar.gz
DotNetOpenAuth-002ce0e39af3b684ce6060dce60805e3333420fa.tar.bz2
Replaces DNOA's internal Requires class with Validation NuGet package.
Diffstat (limited to 'src/DotNetOpenAuth.Core/Messaging/Reflection/MessagePart.cs')
-rw-r--r--src/DotNetOpenAuth.Core/Messaging/Reflection/MessagePart.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/DotNetOpenAuth.Core/Messaging/Reflection/MessagePart.cs b/src/DotNetOpenAuth.Core/Messaging/Reflection/MessagePart.cs
index a6e8da2..6c9aef3 100644
--- a/src/DotNetOpenAuth.Core/Messaging/Reflection/MessagePart.cs
+++ b/src/DotNetOpenAuth.Core/Messaging/Reflection/MessagePart.cs
@@ -16,6 +16,7 @@ namespace DotNetOpenAuth.Messaging.Reflection {
using System.Reflection;
using System.Xml;
using DotNetOpenAuth.Configuration;
+ using Validation;
/// <summary>
/// Describes an individual member of a message and assists in its serialization.
@@ -106,7 +107,7 @@ namespace DotNetOpenAuth.Messaging.Reflection {
[SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity", Justification = "Unavoidable"), SuppressMessage("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily", Justification = "Code contracts requires it.")]
internal MessagePart(MemberInfo member, MessagePartAttribute attribute) {
Requires.NotNull(member, "member");
- Requires.True(member is FieldInfo || member is PropertyInfo, "member");
+ Requires.That(member is FieldInfo || member is PropertyInfo, "member", "Member must be a property or field.");
Requires.NotNull(attribute, "attribute");
this.field = member as FieldInfo;
@@ -203,7 +204,7 @@ namespace DotNetOpenAuth.Messaging.Reflection {
/// </summary>
internal string StaticConstantValue {
get {
- Requires.ValidState(this.IsConstantValueAvailableStatically);
+ RequiresEx.ValidState(this.IsConstantValueAvailableStatically);
return this.ToString(this.field.GetValue(null), false);
}
}