Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / CompMod / System / ComponentModel / Design / DocumentCollection.cs / 1 / DocumentCollection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.ComponentModel.Design { using Microsoft.Win32; using System.Collections; using System.ComponentModel; using System.Diagnostics; using System.Runtime.InteropServices; using System.Security.Permissions; ////// [HostProtection(SharedState = true)] [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.InheritanceDemand, Name = "FullTrust")] [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.LinkDemand, Name="FullTrust")] public class DesignerCollection : ICollection { private IList designers; ////// Provides a read-only collection of documents. /// ////// public DesignerCollection(IDesignerHost[] designers) { if (designers != null) { this.designers = new ArrayList(designers); } else { this.designers = new ArrayList(); } } ////// Initializes a new instance of the ///class /// that stores an array with a pointer to each /// for each document in the collection. /// /// public DesignerCollection(IList designers) { this.designers = designers; } ////// Initializes a new instance of the ///class /// that stores an array with a pointer to each /// for each document in the collection. /// /// public int Count { get { return designers.Count; } } ///Gets or /// sets the number /// of documents in the collection. ////// public virtual IDesignerHost this[int index] { get { return (IDesignerHost)designers[index]; } } ///Gets /// or sets the document at the specified index. ////// public IEnumerator GetEnumerator() { return designers.GetEnumerator(); } ///Creates and retrieves a new enumerator for this collection. ///int ICollection.Count { get { return Count; } } /// bool ICollection.IsSynchronized { get { return false; } } /// object ICollection.SyncRoot { get { return null; } } /// void ICollection.CopyTo(Array array, int index) { designers.CopyTo(array, index); } /// IEnumerator IEnumerable.GetEnumerator() { return GetEnumerator(); } } }
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- FrameworkContextData.cs
- MetafileHeaderWmf.cs
- ExistsInCollection.cs
- StateRuntime.cs
- QilXmlReader.cs
- SqlDependency.cs
- COM2ExtendedUITypeEditor.cs
- IgnoreFileBuildProvider.cs
- DbProviderConfigurationHandler.cs
- BitmapEffectInput.cs
- COM2IPerPropertyBrowsingHandler.cs
- SerialReceived.cs
- _Events.cs
- SQLBinary.cs
- DataGridViewTextBoxCell.cs
- DataSourceUtil.cs
- ServiceModelConfigurationSection.cs
- CryptographicAttribute.cs
- RelationshipFixer.cs
- ConvertTextFrag.cs
- RemoteWebConfigurationHostStream.cs
- CodeDirectiveCollection.cs
- WmfPlaceableFileHeader.cs
- WebServiceTypeData.cs
- safex509handles.cs
- Nullable.cs
- TableRowsCollectionEditor.cs
- WindowsTooltip.cs
- SaveFileDialog.cs
- CorePropertiesFilter.cs
- SQLInt64Storage.cs
- GridEntry.cs
- PrimitiveXmlSerializers.cs
- MetadataArtifactLoaderComposite.cs
- SecurityVersion.cs
- CompositionAdorner.cs
- TextServicesCompartment.cs
- CodeTypeMember.cs
- OLEDB_Enum.cs
- WithStatement.cs
- AccessDataSourceDesigner.cs
- InvalidProgramException.cs
- TrackPointCollection.cs
- DbSource.cs
- brushes.cs
- CancelEventArgs.cs
- HttpCachePolicyElement.cs
- IBuiltInEvidence.cs
- EntityContainer.cs
- HttpTransportElement.cs
- RadioButton.cs
- LocalizationParserHooks.cs
- LicenseContext.cs
- GcHandle.cs
- DataGridViewTopLeftHeaderCell.cs
- CompiledRegexRunnerFactory.cs
- Wildcard.cs
- XmlNavigatorFilter.cs
- ChildChangedEventArgs.cs
- SystemEvents.cs
- SessionPageStatePersister.cs
- MatrixTransform.cs
- StandardOleMarshalObject.cs
- SamlSubjectStatement.cs
- SmiEventSink.cs
- UpdateEventArgs.cs
- TextDecoration.cs
- FontEmbeddingManager.cs
- RemotingSurrogateSelector.cs
- Parameter.cs
- RequestCacheValidator.cs
- MemoryMappedView.cs
- UIElementHelper.cs
- LayoutTable.cs
- TemplateColumn.cs
- CellConstant.cs
- VisualTreeUtils.cs
- WmlObjectListAdapter.cs
- FormatConvertedBitmap.cs
- GCHandleCookieTable.cs
- SvcMapFileSerializer.cs
- DataGridViewLinkColumn.cs
- ContextMenu.cs
- RightsManagementInformation.cs
- TablePatternIdentifiers.cs
- CellQuery.cs
- EntityClassGenerator.cs
- FixedDocumentSequencePaginator.cs
- ObjectViewEntityCollectionData.cs
- Interop.cs
- FixedDocument.cs
- ToReply.cs
- SQLBytesStorage.cs
- SingleBodyParameterMessageFormatter.cs
- ClientApiGenerator.cs
- OneOf.cs
- StyleBamlRecordReader.cs
- TextEditorCharacters.cs
- ProxyManager.cs
- BinHexDecoder.cs