Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Configuration / System / Configuration / PropertyInformationCollection.cs / 1305376 / PropertyInformationCollection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- using System; using System.Configuration; using System.Collections.Specialized; using System.ComponentModel; using System.Collections; using System.Runtime.Serialization; using System.Security.Permissions; namespace System.Configuration { // PropertyInformationCollection // // Collection of PropertyInformation objects // [Serializable()] public sealed class PropertyInformationCollection : NameObjectCollectionBase { ConfigurationElement ThisElement = null; internal PropertyInformationCollection(ConfigurationElement thisElement) : base(StringComparer.Ordinal) { ThisElement = thisElement; foreach (ConfigurationProperty prop in ThisElement.Properties) { if (prop.Name != ThisElement.ElementTagName) { BaseAdd(prop.Name, new PropertyInformation(thisElement, prop.Name)); } } IsReadOnly = true; } [SecurityPermissionAttribute(SecurityAction.Demand,SerializationFormatter=true)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); } // Item // // Indexor for retrieving a Property by name // public PropertyInformation this[string propertyName] { get { PropertyInformation result = (PropertyInformation) BaseGet (propertyName); // check for default collection name if (result == null) { PropertyInformation defaultColl = (PropertyInformation) BaseGet (ConfigurationProperty.DefaultCollectionPropertyName); if ((defaultColl != null) && (defaultColl.ProvidedName == propertyName)) { result = defaultColl; } } return result; } } internal PropertyInformation this[int index] { get { return (PropertyInformation)BaseGet(BaseGetKey(index)); } } public void CopyTo(PropertyInformation[] array, int index) { if (array == null) { throw new ArgumentNullException("array"); } if (array.Length < Count + index) { throw new ArgumentOutOfRangeException("index"); } foreach (PropertyInformation pi in this) { array[index++] = pi; } } public override IEnumerator GetEnumerator() { int c = Count; for (int i = 0; i < c; i++) { yield return this[i]; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DBBindings.cs
- SecurityContext.cs
- CheckPair.cs
- IChannel.cs
- EventOpcode.cs
- VoiceSynthesis.cs
- ToolbarAUtomationPeer.cs
- TypeListConverter.cs
- HtmlEmptyTagControlBuilder.cs
- AssertHelper.cs
- RightsManagementEncryptionTransform.cs
- XhtmlBasicImageAdapter.cs
- RSAPKCS1KeyExchangeFormatter.cs
- LogManagementAsyncResult.cs
- MethodExpr.cs
- EditorZone.cs
- FormsIdentity.cs
- DispatcherFrame.cs
- ScrollItemProviderWrapper.cs
- CompilationAssemblyInstallComponent.cs
- DataServiceHostFactory.cs
- Vector3DAnimation.cs
- _ListenerRequestStream.cs
- ViewDesigner.cs
- GlyphRun.cs
- CodeExporter.cs
- ClonableStack.cs
- RoutingChannelExtension.cs
- TraceSection.cs
- SqlMetaData.cs
- NetStream.cs
- ActivityBuilderHelper.cs
- SystemIPGlobalStatistics.cs
- InteropAutomationProvider.cs
- KeyInstance.cs
- DateTimeFormatInfoScanner.cs
- LoginNameDesigner.cs
- PrintPreviewGraphics.cs
- ValidationHelpers.cs
- OutputCacheSettings.cs
- exports.cs
- CollectionConverter.cs
- TextureBrush.cs
- DiscoveryServiceExtension.cs
- Vector3DAnimationBase.cs
- Currency.cs
- ExitEventArgs.cs
- ResizingMessageFilter.cs
- HyperLinkStyle.cs
- ProxyWebPartManager.cs
- SqlUDTStorage.cs
- XmlNamespaceManager.cs
- AddToCollection.cs
- FreeIndexList.cs
- StyleHelper.cs
- ThreadSafeList.cs
- StringComparer.cs
- AsymmetricSecurityProtocolFactory.cs
- invalidudtexception.cs
- MemoryRecordBuffer.cs
- NativeRightsManagementAPIsStructures.cs
- ZoneLinkButton.cs
- XPathSelfQuery.cs
- RepeaterItemCollection.cs
- RegistryDataKey.cs
- DataGridViewImageCell.cs
- HttpContextWrapper.cs
- HandlerBase.cs
- MouseActionConverter.cs
- PolicyStatement.cs
- DateTimeStorage.cs
- XPathQueryGenerator.cs
- TextLine.cs
- XmlEntityReference.cs
- CustomLineCap.cs
- iisPickupDirectory.cs
- DecoderBestFitFallback.cs
- EntityClientCacheKey.cs
- Gdiplus.cs
- HttpProfileBase.cs
- TransformedBitmap.cs
- StringArrayConverter.cs
- CqlIdentifiers.cs
- AnonymousIdentificationModule.cs
- PreDigestedSignedInfo.cs
- ConfigsHelper.cs
- ProfileSettings.cs
- DbReferenceCollection.cs
- TypeDefinition.cs
- TypeReference.cs
- SHA512CryptoServiceProvider.cs
- Nullable.cs
- Vector3DConverter.cs
- EventMappingSettingsCollection.cs
- DBNull.cs
- SamlConditions.cs
- CompiledRegexRunnerFactory.cs
- ProfileBuildProvider.cs
- milrender.cs
- ContentOperations.cs