public bool Contains(string key) { using (var site = CreateSite()) { var list = new ConfigurationList(site); return(list.ContainsKey(buildKeyFunc(key), this.contextId)); } }
public void Remove(string key) { using (var site = CreateSite()) { site.RootWeb.AllowUnsafeUpdates = true; var list = new ConfigurationList(site); string fullKey = buildKeyFunc(key); if (list.ContainsKey(fullKey, this.contextId)) { list.Remove(fullKey, this.contextId); } site.RootWeb.AllowUnsafeUpdates = false; } }