Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WinForms / System / WinForms / Design / Behavior / adornercollection.cs / 1 / adornercollection.cs
namespace System.Windows.Forms.Design.Behavior { using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; ////// /// ////// A collection that stores ///objects. /// [SuppressMessage("Microsoft.Design", "CA1010:CollectionsShouldImplementGenericInterface")] public sealed class BehaviorServiceAdornerCollection : CollectionBase { private BehaviorService behaviorService; /// /// /// public BehaviorServiceAdornerCollection(BehaviorService behaviorService) { this.behaviorService = behaviorService; } ////// Initializes a new instance of ///. /// /// /// /// /// A/// Initializes a new instance of ///based on another . /// from which the contents are copied /// public BehaviorServiceAdornerCollection(BehaviorServiceAdornerCollection value) { this.AddRange(value); } /// /// /// /// /// A array of/// Initializes a new instance of ///containing any array of objects. /// objects with which to intialize the collection /// public BehaviorServiceAdornerCollection(Adorner[] value) { this.AddRange(value); } /// /// /// ///Represents the entry at the specified index of the ///. The zero-based index of the entry to locate in the collection. ////// ///The entry at the specified index of the collection. ///public Adorner this[int index] { get { return ((Adorner)(List[index])); } set { List[index] = value; } } /// is outside the valid range of indexes for the collection. /// /// /// TheAdds a ///with the specified value to the /// . to add. /// /// ///The index at which the new element was inserted. ///public int Add(Adorner value) { value.BehaviorService = behaviorService; return List.Add(value); } /// /// /// /// /// An array of typeCopies the elements of an array to the end of the ///. containing the objects to add to the collection. /// /// /// ///None. ///public void AddRange(Adorner[] value) { for (int i = 0; (i < value.Length); i = (i + 1)) { this.Add(value[i]); } } /// /// /// /// /// A/// Adds the contents of another ///to the end of the collection. /// containing the objects to add to the collection. /// /// /// ///None. ///public void AddRange(BehaviorServiceAdornerCollection value) { for (int i = 0; (i < value.Count); i = (i + 1)) { this.Add(value[i]); } } /// /// /// /// TheGets a value indicating whether the /// ///contains the specified . to locate. /// /// ////// if the is contained in the collection; /// otherwise, . public bool Contains(Adorner value) { return List.Contains(value); } /// /// /// ///Copies the ///values to a one-dimensional instance at the /// specified index. The one-dimensional /// The index inthat is the destination of the values copied from . where copying begins. /// /// ///None. ////// is multidimensional. -or- The number of elements in the is greater than the available space between and the end of . /// is . /// is less than 's lowbound. public void CopyTo(Adorner[] array, int index) { List.CopyTo(array, index); } /// /// /// /// TheReturns the index of a ///in /// the . to locate. /// /// ///The index of the ///of in the /// , if found; otherwise, -1. public int IndexOf(Adorner value) { return List.IndexOf(value); } /// /// /// /// The zero-based index whereInserts a ///into the at the specified index. should be inserted. /// The to insert. /// /// None. public void Insert(int index, Adorner value) { List.Insert(index, value); } /// /// /// ///Returns an enumerator that can iterate through /// the ///. /// None. public new BehaviorServiceAdornerCollectionEnumerator GetEnumerator() { return new BehaviorServiceAdornerCollectionEnumerator(this); } /// /// /// /// TheRemoves a specific ///from the /// . to remove from the . /// /// None. public void Remove(Adorner value) { List.Remove(value); } } /// is not found in the Collection. public class BehaviorServiceAdornerCollectionEnumerator : object, IEnumerator { private IEnumerator baseEnumerator; private IEnumerable temp; /// public BehaviorServiceAdornerCollectionEnumerator(BehaviorServiceAdornerCollection mappings) { this.temp = ((IEnumerable)(mappings)); this.baseEnumerator = temp.GetEnumerator(); } /// public Adorner Current { get { return ((Adorner)(baseEnumerator.Current)); } } /// /// object IEnumerator.Current { get { return baseEnumerator.Current; } } /// public bool MoveNext() { return baseEnumerator.MoveNext(); } /// /// bool IEnumerator.MoveNext() { return baseEnumerator.MoveNext(); } /// public void Reset() { baseEnumerator.Reset(); } /// /// void IEnumerator.Reset() { baseEnumerator.Reset(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- AsymmetricSecurityBindingElement.cs
- VirtualizingPanel.cs
- ActivityWithResultConverter.cs
- Model3DCollection.cs
- ListDictionaryInternal.cs
- TransportElement.cs
- LinqExpressionNormalizer.cs
- XmlSubtreeReader.cs
- ResourceDictionaryCollection.cs
- EpmCustomContentWriterNodeData.cs
- CroppedBitmap.cs
- ToolTipAutomationPeer.cs
- NetworkCredential.cs
- AppSettings.cs
- Keywords.cs
- Internal.cs
- MessageQueueTransaction.cs
- ArrangedElement.cs
- ExpressionVisitor.cs
- MenuItemStyle.cs
- FormsAuthenticationModule.cs
- ProcessThread.cs
- PolicyUnit.cs
- EncoderReplacementFallback.cs
- Effect.cs
- DataViewManager.cs
- AnnotationDocumentPaginator.cs
- SerializerWriterEventHandlers.cs
- DataGridColumn.cs
- BitmapEffect.cs
- DBConnectionString.cs
- WorkflowApplicationTerminatedException.cs
- StateInitializationDesigner.cs
- HopperCache.cs
- DataObject.cs
- WeakReferenceEnumerator.cs
- MD5Cng.cs
- Splitter.cs
- XhtmlBasicValidationSummaryAdapter.cs
- ReferencedAssembly.cs
- XmlName.cs
- SafeNativeMethods.cs
- _ScatterGatherBuffers.cs
- IntSecurity.cs
- _LoggingObject.cs
- Rotation3D.cs
- InternalBufferOverflowException.cs
- XmlArrayItemAttributes.cs
- XmlSchemaSequence.cs
- PermissionAttributes.cs
- TypeAccessException.cs
- Int32CollectionConverter.cs
- OSFeature.cs
- SimpleBitVector32.cs
- SystemWebSectionGroup.cs
- SendDesigner.xaml.cs
- HttpException.cs
- ProtocolsConfigurationEntry.cs
- SafeFileMapViewHandle.cs
- entitydatasourceentitysetnameconverter.cs
- TextEffect.cs
- Int32Animation.cs
- XPathSelectionIterator.cs
- FtpCachePolicyElement.cs
- HttpTransportSecurityElement.cs
- Content.cs
- RuntimeWrappedException.cs
- localization.cs
- Rect3D.cs
- _SingleItemRequestCache.cs
- DataTableReaderListener.cs
- ADConnectionHelper.cs
- NamespaceMapping.cs
- StickyNote.cs
- PropagatorResult.cs
- FileDialog_Vista_Interop.cs
- SrgsDocumentParser.cs
- MetadataItemEmitter.cs
- HelpEvent.cs
- Identity.cs
- Parameter.cs
- BinaryObjectInfo.cs
- BinaryWriter.cs
- UpdatePanelTriggerCollection.cs
- embossbitmapeffect.cs
- DeviceContext.cs
- OleDbConnectionInternal.cs
- DataGridViewCellStyleChangedEventArgs.cs
- Confirm.cs
- IisHelper.cs
- InputLanguageEventArgs.cs
- DataRowComparer.cs
- XsltInput.cs
- SamlAction.cs
- Point4D.cs
- cache.cs
- _SslState.cs
- SymmetricKey.cs
- ResourceDescriptionAttribute.cs
- Certificate.cs