summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
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
}
}
}