Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / Design / DocumentCollection.cs / 1305376 / 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;
///
///
/// Provides a read-only collection of documents.
///
///
[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;
///
///
/// Initializes a new instance of the class
/// that stores an array with a pointer to each
/// for each document in the collection.
///
///
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;
}
///
/// Gets or
/// sets the number
/// of documents in the collection.
///
public int Count {
get {
return designers.Count;
}
}
///
/// Gets
/// or sets the document at the specified index.
///
public virtual IDesignerHost this[int index] {
get {
return (IDesignerHost)designers[index];
}
}
///
/// Creates and retrieves a new enumerator for this collection.
///
public IEnumerator GetEnumerator() {
return designers.GetEnumerator();
}
///
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();
}
}
}
// 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
- TimelineGroup.cs
- ContractListAdapter.cs
- CriticalHandle.cs
- DifferencingCollection.cs
- ScriptReferenceEventArgs.cs
- ActivityLocationReferenceEnvironment.cs
- IdentityManager.cs
- Thumb.cs
- FixedElement.cs
- FlowchartStart.xaml.cs
- EventEntry.cs
- LowerCaseStringConverter.cs
- ClientRuntimeConfig.cs
- RequestTimeoutManager.cs
- WebBrowserSiteBase.cs
- ClockController.cs
- BinaryFormatterSinks.cs
- PropertyTabChangedEvent.cs
- AuthenticationException.cs
- AxisAngleRotation3D.cs
- CompilationLock.cs
- CodeCommentStatementCollection.cs
- FrugalList.cs
- DataTemplateKey.cs
- NativeMethods.cs
- XmlSchemaSimpleContentRestriction.cs
- ConditionalWeakTable.cs
- WebPartTransformerCollection.cs
- ContextMenuStripGroupCollection.cs
- IdentifierService.cs
- DBDataPermission.cs
- BindValidator.cs
- ContentElementAutomationPeer.cs
- ControlCachePolicy.cs
- EventDescriptor.cs
- PlatformCulture.cs
- Base64Decoder.cs
- Route.cs
- ControlDesigner.cs
- ListViewItem.cs
- ConsumerConnectionPointCollection.cs
- CapabilitiesPattern.cs
- DataGridViewAccessibleObject.cs
- GridView.cs
- TextEditorCharacters.cs
- NumberFormatter.cs
- PointIndependentAnimationStorage.cs
- GrammarBuilderRuleRef.cs
- ArgumentValidation.cs
- GroupAggregateExpr.cs
- LineMetrics.cs
- XmlWriterTraceListener.cs
- ClientTargetCollection.cs
- SoapDocumentMethodAttribute.cs
- CodeSubDirectoriesCollection.cs
- MouseButton.cs
- Utils.cs
- StylusPointDescription.cs
- SQLDecimalStorage.cs
- OrderedEnumerableRowCollection.cs
- ProfilePropertySettingsCollection.cs
- Gdiplus.cs
- GcHandle.cs
- Delay.cs
- ListSortDescriptionCollection.cs
- SessionStateItemCollection.cs
- OdbcError.cs
- AsymmetricKeyExchangeDeformatter.cs
- RootBrowserWindow.cs
- EventListenerClientSide.cs
- ColumnMapProcessor.cs
- InvokeGenerator.cs
- XmlAutoDetectWriter.cs
- TableRowGroup.cs
- DynamicDataResources.Designer.cs
- WebPartVerbCollection.cs
- SqlFactory.cs
- ExecutionEngineException.cs
- RowToParametersTransformer.cs
- BulletedListEventArgs.cs
- SerialStream.cs
- WinEventTracker.cs
- UnsafePeerToPeerMethods.cs
- Font.cs
- SourceLocation.cs
- ConsoleKeyInfo.cs
- KoreanLunisolarCalendar.cs
- DbConnectionFactory.cs
- TextInfo.cs
- DBParameter.cs
- DesignerEditorPartChrome.cs
- AdPostCacheSubstitution.cs
- DynamicResourceExtensionConverter.cs
- TextCompositionEventArgs.cs
- SequenceFullException.cs
- PKCS1MaskGenerationMethod.cs
- RegisteredExpandoAttribute.cs
- FixedSOMGroup.cs
- ApplyHostConfigurationBehavior.cs
- Command.cs