summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2009-09-23 09:19:21 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2009-09-23 09:19:21 -0700
commit5ade84d92b8ae3c09a88f601127b65d6bb1b5c03 (patch)
tree6c08033c9eea3340664c78ae3bcdbad106ee1dc1
parenta997f5c1de9b00eb5e079e7c319718bd15d580e0 (diff)
downloadDotNetOpenAuth-5ade84d92b8ae3c09a88f601127b65d6bb1b5c03.zip
DotNetOpenAuth-5ade84d92b8ae3c09a88f601127b65d6bb1b5c03.tar.gz
DotNetOpenAuth-5ade84d92b8ae3c09a88f601127b65d6bb1b5c03.tar.bz2
Added another contract.
-rw-r--r--src/DotNetOpenAuth/InfoCard/InfoCardSelector.cs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/DotNetOpenAuth/InfoCard/InfoCardSelector.cs b/src/DotNetOpenAuth/InfoCard/InfoCardSelector.cs
index ad1e84a..71f7fdd 100644
--- a/src/DotNetOpenAuth/InfoCard/InfoCardSelector.cs
+++ b/src/DotNetOpenAuth/InfoCard/InfoCardSelector.cs
@@ -272,6 +272,7 @@ namespace DotNetOpenAuth.InfoCard {
}
set {
+ Contract.Requires<InvalidOperationException>(string.IsNullOrEmpty(value) || this.Page == null || this.DesignMode || (HttpContext.Current != null && HttpContext.Current.Request != null), MessagingStrings.HttpContextRequired);
if (!string.IsNullOrEmpty(value)) {
if (this.Page != null && !this.DesignMode) {
// Validate new value by trying to construct a Uri based on it.