summaryrefslogtreecommitdiffstats
path: root/src/DotNetOAuth/Messaging/Reflection/ValueMapping.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/DotNetOAuth/Messaging/Reflection/ValueMapping.cs')
-rw-r--r--src/DotNetOAuth/Messaging/Reflection/ValueMapping.cs27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/DotNetOAuth/Messaging/Reflection/ValueMapping.cs b/src/DotNetOAuth/Messaging/Reflection/ValueMapping.cs
new file mode 100644
index 0000000..2371b49
--- /dev/null
+++ b/src/DotNetOAuth/Messaging/Reflection/ValueMapping.cs
@@ -0,0 +1,27 @@
+//-----------------------------------------------------------------------
+// <copyright file="ValueMapping.cs" company="Andrew Arnott">
+// Copyright (c) Andrew Arnott. All rights reserved.
+// </copyright>
+//-----------------------------------------------------------------------
+
+namespace DotNetOAuth.Messaging.Reflection {
+ using System;
+
+ internal struct ValueMapping {
+ internal Func<object, string> ValueToString;
+ internal Func<string, object> StringToValue;
+
+ internal ValueMapping(Func<object, string> toString, Func<string, object> toValue) {
+ if (toString == null) {
+ throw new ArgumentNullException("toString");
+ }
+
+ if (toValue == null) {
+ throw new ArgumentNullException("toValue");
+ }
+
+ this.ValueToString = toString;
+ this.StringToValue = toValue;
+ }
+ }
+}