Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / Configuration / SqlCacheDependencyDatabaseCollection.cs / 2 / SqlCacheDependencyDatabaseCollection.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.Configuration {
using System;
using System.Xml;
using System.Configuration;
using System.Collections.Specialized;
using System.Collections;
using System.Globalization;
using System.IO;
using System.Text;
using System.Diagnostics;
using System.Web.Util;
using System.Security.Permissions;
[ConfigurationCollection(typeof(SqlCacheDependencyDatabase))]
[AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
public sealed class SqlCacheDependencyDatabaseCollection : ConfigurationElementCollection {
private static ConfigurationPropertyCollection _properties;
static SqlCacheDependencyDatabaseCollection() {
// Property initialization
_properties = new ConfigurationPropertyCollection();
}
public SqlCacheDependencyDatabaseCollection() {
}
// public properties
public String[] AllKeys {
get {
return StringUtil.ObjectArrayToStringArray(BaseGetAllKeys());
}
}
public new SqlCacheDependencyDatabase this[string name] {
get {
return (SqlCacheDependencyDatabase)BaseGet(name);
}
// Having a setter here would be strange in that you could write
// collection["Name1"] = new SqlCacheDependencyDatabase("differentName"...
//
}
public SqlCacheDependencyDatabase this[int index] {
get {
return (SqlCacheDependencyDatabase)BaseGet(index);
}
set {
if (BaseGet(index) != null) {
BaseRemoveAt(index);
}
BaseAdd(index, value);
}
}
// Protected Overrides
protected override ConfigurationElement CreateNewElement() {
return new SqlCacheDependencyDatabase();
}
protected override Object GetElementKey(ConfigurationElement element) {
return ((SqlCacheDependencyDatabase)element).Name;
}
// public methods
public void Add(SqlCacheDependencyDatabase name) {
BaseAdd(name);
}
public void Clear() {
BaseClear();
}
public SqlCacheDependencyDatabase Get(int index) {
return (SqlCacheDependencyDatabase)BaseGet(index);
}
public SqlCacheDependencyDatabase Get(string name) {
return (SqlCacheDependencyDatabase)BaseGet(name);
}
public String GetKey(int index) {
return (String)BaseGetKey(index);
}
public void Remove(string name) {
BaseRemove(name);
}
public void RemoveAt(int index) {
BaseRemoveAt(index);
}
public void Set(SqlCacheDependencyDatabase user) {
BaseAdd(user, false);
}
}
}
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- PropertySourceInfo.cs
- WebEventCodes.cs
- UniqueIdentifierService.cs
- ContentOperations.cs
- Literal.cs
- NodeFunctions.cs
- FontNamesConverter.cs
- DrawingBrush.cs
- TypeAccessException.cs
- UrlUtility.cs
- OleDbParameterCollection.cs
- DesignerForm.cs
- ScrollBar.cs
- CompilerErrorCollection.cs
- SHA256CryptoServiceProvider.cs
- WorkflowServiceAttributes.cs
- ObjectQuery.cs
- WsdlBuildProvider.cs
- StylusTip.cs
- SubpageParagraph.cs
- SqlResolver.cs
- DnsCache.cs
- RemotingAttributes.cs
- DataGridViewRowPostPaintEventArgs.cs
- XamlSerializationHelper.cs
- CheckPair.cs
- MediaContextNotificationWindow.cs
- SafeBitVector32.cs
- FreeFormDesigner.cs
- WindowsAuthenticationEventArgs.cs
- EventLogQuery.cs
- dataobject.cs
- NullableDoubleMinMaxAggregationOperator.cs
- PassportAuthentication.cs
- BooleanConverter.cs
- TemplatePartAttribute.cs
- CodeDOMUtility.cs
- ContourSegment.cs
- SafeRightsManagementPubHandle.cs
- DocumentViewer.cs
- FilterUserControlBase.cs
- DBSchemaTable.cs
- CancellationHandler.cs
- IDictionary.cs
- GlobalEventManager.cs
- DocumentGridPage.cs
- Typography.cs
- __FastResourceComparer.cs
- BindingMAnagerBase.cs
- WorkflowFileItem.cs
- FixedSchema.cs
- StateDesigner.cs
- SiteMapSection.cs
- LineUtil.cs
- DataSourceExpression.cs
- DecoderReplacementFallback.cs
- FixedTextBuilder.cs
- CollectionBase.cs
- SingleBodyParameterMessageFormatter.cs
- linebase.cs
- Compiler.cs
- CommandDesigner.cs
- PeerCollaborationPermission.cs
- ScalarType.cs
- SqlParameterCollection.cs
- PartialCachingControl.cs
- ParamArrayAttribute.cs
- State.cs
- CleanUpVirtualizedItemEventArgs.cs
- GiveFeedbackEventArgs.cs
- IncrementalCompileAnalyzer.cs
- XsltCompileContext.cs
- SafeTimerHandle.cs
- PluralizationServiceUtil.cs
- DataGridViewComboBoxCell.cs
- StructuralComparisons.cs
- HtmlControlDesigner.cs
- InfoCardListRequest.cs
- DataGridViewImageCell.cs
- ElementNotAvailableException.cs
- SecurityTokenResolver.cs
- KeyEvent.cs
- CapabilitiesSection.cs
- TextRangeSerialization.cs
- FlowLayout.cs
- TransactionManagerProxy.cs
- EntityContainerEmitter.cs
- DocumentViewerConstants.cs
- Visual.cs
- RegularExpressionValidator.cs
- UIPropertyMetadata.cs
- PointAnimation.cs
- CompilerLocalReference.cs
- SqlClientMetaDataCollectionNames.cs
- WorkflowMarkupSerializationManager.cs
- OptionUsage.cs
- TypeSystemProvider.cs
- OSFeature.cs
- HashCodeCombiner.cs
- StreamAsIStream.cs