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
- Group.cs
- PageClientProxyGenerator.cs
- FormViewPagerRow.cs
- EntityDataSourceMemberPath.cs
- ControlCollection.cs
- CheckBox.cs
- MemberDomainMap.cs
- ColorConvertedBitmap.cs
- _AcceptOverlappedAsyncResult.cs
- TextServicesDisplayAttributePropertyRanges.cs
- FixedDocumentPaginator.cs
- ApplyImportsAction.cs
- HttpContextServiceHost.cs
- Storyboard.cs
- ServiceDocumentFormatter.cs
- ResXBuildProvider.cs
- BamlVersionHeader.cs
- VisualTreeUtils.cs
- MappingSource.cs
- SQLByte.cs
- SqlCachedBuffer.cs
- sqlcontext.cs
- FixedTextContainer.cs
- LookupBindingPropertiesAttribute.cs
- LookupBindingPropertiesAttribute.cs
- indexingfiltermarshaler.cs
- ChildrenQuery.cs
- CommandField.cs
- FileAuthorizationModule.cs
- UserControlBuildProvider.cs
- DuplicateWaitObjectException.cs
- BigInt.cs
- PartialList.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- SQLMoneyStorage.cs
- CacheDependency.cs
- SafeRightsManagementHandle.cs
- ThreadAttributes.cs
- Decimal.cs
- ProgressBarRenderer.cs
- SecUtil.cs
- FlowPosition.cs
- ReflectionUtil.cs
- KeyedQueue.cs
- ResXResourceWriter.cs
- IntPtr.cs
- XmlSchema.cs
- HostUtils.cs
- ContractNamespaceAttribute.cs
- IdentityNotMappedException.cs
- UnsafeNativeMethods.cs
- _LocalDataStore.cs
- SafeReversePInvokeHandle.cs
- BrowserInteropHelper.cs
- CommonGetThemePartSize.cs
- GridViewEditEventArgs.cs
- FontFaceLayoutInfo.cs
- ListBoxItem.cs
- PageCodeDomTreeGenerator.cs
- DataColumnMappingCollection.cs
- WindowsSpinner.cs
- InternalDuplexChannelFactory.cs
- FilterElement.cs
- CompositeKey.cs
- TypeConverterAttribute.cs
- ItemAutomationPeer.cs
- Pts.cs
- Figure.cs
- SystemWebSectionGroup.cs
- DataStorage.cs
- Property.cs
- Helpers.cs
- DrawingContextWalker.cs
- ArraySortHelper.cs
- SimplePropertyEntry.cs
- PerformanceCounterPermission.cs
- DispatcherOperation.cs
- DrawListViewColumnHeaderEventArgs.cs
- HexParser.cs
- SafeProcessHandle.cs
- ObjectViewListener.cs
- InternalEnumValidator.cs
- BaseResourcesBuildProvider.cs
- ContextQuery.cs
- DataServiceExpressionVisitor.cs
- ReverseInheritProperty.cs
- AssociationSet.cs
- GetLedgerRequest.cs
- XmlBoundElement.cs
- TimeSpanValidatorAttribute.cs
- ParserOptions.cs
- IListConverters.cs
- QueryAsyncResult.cs
- PolyQuadraticBezierSegment.cs
- XmlNodeComparer.cs
- RuleSettingsCollection.cs
- InputLanguageCollection.cs
- SubstitutionList.cs
- TargetConverter.cs
- BinaryObjectWriter.cs