public bool Contains(string key) { Validation.ArgumentNotNullOrEmpty(key, "key"); var args = new ContainsKeyDataArgs(); args.Key = key; args.SiteId = this.siteId; args.Level = (int) ConfigLevel.CurrentSPWebApplication; var result = SPUtility.ExecuteRegisteredProxyOperation( ContainsKeyDataArgs.OperationAssemblyName, ContainsKeyDataArgs.OperationTypeName, args); if (result != null && result.GetType().IsSubclassOf(typeof(System.Exception))) { var ex = new ConfigurationException(string.Format(CultureInfo.CurrentCulture, Resources.UnexpectedExceptionFromSandbox, ConfigLevel.CurrentSPWebApplication.ToString()), (Exception)result); throw ex; } return (bool)result; }
public bool Contains(string key) { Validation.ArgumentNotNullOrEmpty(key, "key"); var args = new ContainsKeyDataArgs(); args.Key = key; args.Level = (int)ConfigLevel.CurrentSPFarm; var result = SPUtility.ExecuteRegisteredProxyOperation( ContainsKeyDataArgs.OperationAssemblyName, ContainsKeyDataArgs.OperationTypeName, args); if (result != null && result.GetType().IsSubclassOf(typeof(System.Exception))) { var exception = (Exception) result; ExceptionHelper.ThrowSandboxConfigurationException(exception, ConfigLevel.CurrentSPFarm); } return (bool)result; }