summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2011-10-10 14:29:00 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2011-10-10 14:29:00 -0700
commitcb9ac7c41553b80b380b35d33ecb36222958c42f (patch)
treed2340858ff8b97dadb57390b7aeb23aeb71e3d43 /src
parenta5d9b6928598b72fb3baeb4485aaf0f34cc61e2e (diff)
downloadDotNetOpenAuth-cb9ac7c41553b80b380b35d33ecb36222958c42f.zip
DotNetOpenAuth-cb9ac7c41553b80b380b35d33ecb36222958c42f.tar.gz
DotNetOpenAuth-cb9ac7c41553b80b380b35d33ecb36222958c42f.tar.bz2
Removed dependencies on PresentationFramework and WindowsBase when targeting .NET 4.0
Diffstat (limited to 'src')
-rw-r--r--src/DotNetOpenAuth.Messaging/Configuration/TypeConfigurationElement.cs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/DotNetOpenAuth.Messaging/Configuration/TypeConfigurationElement.cs b/src/DotNetOpenAuth.Messaging/Configuration/TypeConfigurationElement.cs
index 0335af5..fb1dee0 100644
--- a/src/DotNetOpenAuth.Messaging/Configuration/TypeConfigurationElement.cs
+++ b/src/DotNetOpenAuth.Messaging/Configuration/TypeConfigurationElement.cs
@@ -11,7 +11,11 @@ namespace DotNetOpenAuth.Configuration {
using System.IO;
using System.Reflection;
using System.Web;
+#if CLR4
+ using System.Xaml;
+#else
using System.Windows.Markup;
+#endif
using DotNetOpenAuth.Messaging;
/// <summary>
@@ -127,7 +131,11 @@ namespace DotNetOpenAuth.Configuration {
/// </remarks>
private static T CreateInstanceFromXaml(Stream xaml) {
Contract.Ensures(Contract.Result<T>() != null);
+#if CLR4
+ return (T)XamlServices.Load(xaml);
+#else
return (T)XamlReader.Load(xaml);
+#endif
}
}
}