Code:
/ DotNET / DotNET / 8.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
- MenuItemBinding.cs
- SiteMapNodeItem.cs
- HttpResponseHeader.cs
- BasicExpandProvider.cs
- ServiceDescriptionSerializer.cs
- BitmapEffectGroup.cs
- XmlReturnWriter.cs
- Substitution.cs
- ObjectStateEntry.cs
- StylusShape.cs
- TemplateColumn.cs
- WindowsListViewGroupHelper.cs
- CodeArrayCreateExpression.cs
- AddInAttribute.cs
- ScrollItemPatternIdentifiers.cs
- DataGridLinkButton.cs
- ResourceReader.cs
- QueryPageSettingsEventArgs.cs
- TypeConstant.cs
- XmlAtomicValue.cs
- HttpListenerPrefixCollection.cs
- SmtpLoginAuthenticationModule.cs
- WebServiceData.cs
- AlternateViewCollection.cs
- HierarchicalDataBoundControlAdapter.cs
- JsonDeserializer.cs
- ToolStripContentPanelRenderEventArgs.cs
- WindowsProgressbar.cs
- SqlDataSourceSummaryPanel.cs
- ProfileModule.cs
- HybridObjectCache.cs
- XmlAttributeCache.cs
- FileUtil.cs
- Pen.cs
- SimpleType.cs
- XmlReader.cs
- OrderedParallelQuery.cs
- ClientTargetSection.cs
- xsdvalidator.cs
- MsmqIntegrationOutputChannel.cs
- unsafenativemethodsother.cs
- sqlmetadatafactory.cs
- IDQuery.cs
- SwitchLevelAttribute.cs
- IItemProperties.cs
- EditorPartChrome.cs
- EncoderBestFitFallback.cs
- ObjectDisposedException.cs
- HttpCapabilitiesBase.cs
- PopOutPanel.cs
- ThemeableAttribute.cs
- ApplicationProxyInternal.cs
- Label.cs
- UInt64.cs
- EmptyCollection.cs
- TraceSection.cs
- SectionInformation.cs
- SqlWebEventProvider.cs
- StringSource.cs
- SelectionGlyph.cs
- NamedPipeAppDomainProtocolHandler.cs
- WebPartCancelEventArgs.cs
- Win32SafeHandles.cs
- SQLDoubleStorage.cs
- FixedDocumentPaginator.cs
- PeerUnsafeNativeCryptMethods.cs
- CodeExpressionRuleDeclaration.cs
- AsyncCompletedEventArgs.cs
- CacheChildrenQuery.cs
- RemoteWebConfigurationHost.cs
- PropertyDescriptor.cs
- Parallel.cs
- SafeWaitHandle.cs
- CustomLineCap.cs
- ApplicationId.cs
- DictionaryContent.cs
- VectorCollection.cs
- XmlResolver.cs
- BamlLocalizableResourceKey.cs
- MailMessageEventArgs.cs
- TransactionManager.cs
- CustomError.cs
- TypeLibConverter.cs
- BamlResourceContent.cs
- BamlLocalizationDictionary.cs
- WpfGeneratedKnownTypes.cs
- ContextInformation.cs
- CrossContextChannel.cs
- BitmapCodecInfo.cs
- ExeConfigurationFileMap.cs
- ExpressionNode.cs
- WriteTimeStream.cs
- TypeElementCollection.cs
- sapiproxy.cs
- Cursor.cs
- TextBounds.cs
- MdiWindowListStrip.cs
- ActivityMarkupSerializer.cs
- ChangeBlockUndoRecord.cs
- AppDomainFactory.cs