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
- ClickablePoint.cs
- AppDomainShutdownMonitor.cs
- DBDataPermissionAttribute.cs
- CannotUnloadAppDomainException.cs
- CubicEase.cs
- hresults.cs
- InfoCardProofToken.cs
- SpecularMaterial.cs
- MoveSizeWinEventHandler.cs
- EventRouteFactory.cs
- KeySplineConverter.cs
- DiscoveryDocument.cs
- ExtendedProperty.cs
- RelatedImageListAttribute.cs
- Section.cs
- ToolStripRenderer.cs
- RelatedPropertyManager.cs
- ValueProviderWrapper.cs
- RepeatBehaviorConverter.cs
- DataControlFieldCollection.cs
- StrongNameKeyPair.cs
- WpfGeneratedKnownTypes.cs
- C14NUtil.cs
- DesignerTransaction.cs
- CodeGenerator.cs
- SqlClientWrapperSmiStreamChars.cs
- BaseDataBoundControl.cs
- FixedPage.cs
- Model3D.cs
- TextElement.cs
- InputProcessorProfilesLoader.cs
- DBCSCodePageEncoding.cs
- DataGridViewCell.cs
- Rijndael.cs
- ByteAnimation.cs
- StringArrayConverter.cs
- ConfigurationLockCollection.cs
- PerformanceCounterNameAttribute.cs
- CustomCredentialPolicy.cs
- RayMeshGeometry3DHitTestResult.cs
- SelectionPatternIdentifiers.cs
- TaiwanCalendar.cs
- ColorAnimation.cs
- SoapTypeAttribute.cs
- XmlSchemaExternal.cs
- NameValuePermission.cs
- AsyncMethodInvoker.cs
- TextElementEnumerator.cs
- ScrollViewerAutomationPeer.cs
- BitConverter.cs
- StreamingContext.cs
- ParameterEditorUserControl.cs
- XsdDateTime.cs
- AssociationSetEnd.cs
- DataSourceControlBuilder.cs
- HashCoreRequest.cs
- HttpModuleActionCollection.cs
- XmlSerializerNamespaces.cs
- LineServicesRun.cs
- DbProviderFactoriesConfigurationHandler.cs
- DataTableTypeConverter.cs
- SchemaElement.cs
- JsonXmlDataContract.cs
- HostedTransportConfigurationBase.cs
- OdbcCommand.cs
- PolyLineSegment.cs
- IPipelineRuntime.cs
- InheritanceService.cs
- TextStore.cs
- SQLDateTime.cs
- OpenTypeCommon.cs
- DataRecordInfo.cs
- TextSimpleMarkerProperties.cs
- TagPrefixAttribute.cs
- ZipIOCentralDirectoryBlock.cs
- CanonicalFormWriter.cs
- ImageIndexConverter.cs
- TimeSpanSecondsConverter.cs
- ScriptControlManager.cs
- TailCallAnalyzer.cs
- ManualResetEvent.cs
- Types.cs
- FrameAutomationPeer.cs
- XmlStreamStore.cs
- SoapInteropTypes.cs
- OptimalTextSource.cs
- _HTTPDateParse.cs
- AliasExpr.cs
- DescriptionAttribute.cs
- CanonicalFontFamilyReference.cs
- HWStack.cs
- PublisherIdentityPermission.cs
- DataPagerField.cs
- DataObjectSettingDataEventArgs.cs
- DocumentPage.cs
- UrlParameterReader.cs
- DateTimeFormatInfoScanner.cs
- FileSystemEventArgs.cs
- XmlNodeChangedEventManager.cs
- HttpContext.cs