Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Xml / System / Xml / schema / XmlSchemaObjectCollection.cs / 1305376 / XmlSchemaObjectCollection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- namespace System.Xml.Schema { using System.Collections; using System.ComponentModel; using System.Xml.Serialization; ////// /// public class XmlSchemaObjectCollection : CollectionBase { XmlSchemaObject parent; ///[To be supplied.] ////// /// public XmlSchemaObjectCollection() { } ///[To be supplied.] ////// /// public XmlSchemaObjectCollection(XmlSchemaObject parent) { this.parent = parent; } ///[To be supplied.] ////// /// public virtual XmlSchemaObject this[int index] { get { return (XmlSchemaObject)List[index]; } set { List[index] = value; } } ///[To be supplied.] ////// /// public new XmlSchemaObjectEnumerator GetEnumerator() { return new XmlSchemaObjectEnumerator(InnerList.GetEnumerator()); } ///[To be supplied.] ////// /// public int Add(XmlSchemaObject item) { return List.Add(item); } ///[To be supplied.] ////// /// public void Insert(int index, XmlSchemaObject item) { List.Insert(index, item); } ///[To be supplied.] ////// /// public int IndexOf(XmlSchemaObject item) { return List.IndexOf(item); } ///[To be supplied.] ////// /// public bool Contains(XmlSchemaObject item) { return List.Contains(item); } ///[To be supplied.] ////// /// public void Remove(XmlSchemaObject item) { List.Remove(item); } ///[To be supplied.] ////// /// public void CopyTo(XmlSchemaObject[] array, int index) { List.CopyTo(array, index); } ///[To be supplied.] ////// /// protected override void OnInsert(int index, object item) { if (parent != null) { parent.OnAdd(this, item); } } ///[To be supplied.] ////// /// protected override void OnSet(int index, object oldValue, object newValue) { if (parent != null) { parent.OnRemove(this, oldValue); parent.OnAdd(this, newValue); } } ///[To be supplied.] ////// /// protected override void OnClear() { if (parent != null) { parent.OnClear(this); } } ///[To be supplied.] ////// /// protected override void OnRemove(int index, object item) { if (parent != null) { parent.OnRemove(this, item); } } internal XmlSchemaObjectCollection Clone() { XmlSchemaObjectCollection coll = new XmlSchemaObjectCollection(); coll.Add(this); return coll; } private void Add(XmlSchemaObjectCollection collToAdd) { this.InnerList.InsertRange(0, collToAdd); } } ///[To be supplied.] ////// /// public class XmlSchemaObjectEnumerator: IEnumerator { IEnumerator enumerator; internal XmlSchemaObjectEnumerator( IEnumerator enumerator ) { this.enumerator = enumerator; } ///[To be supplied.] ////// /// public void Reset() { enumerator.Reset(); } ///[To be supplied.] ////// /// public bool MoveNext() { return enumerator.MoveNext(); } ///[To be supplied.] ////// /// public XmlSchemaObject Current { get { return (XmlSchemaObject)enumerator.Current; } } ///[To be supplied.] ////// void IEnumerator.Reset() { enumerator.Reset(); } /// /// bool IEnumerator.MoveNext() { return enumerator.MoveNext(); } /// /// object IEnumerator.Current { get { return enumerator.Current; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ // // Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- namespace System.Xml.Schema { using System.Collections; using System.ComponentModel; using System.Xml.Serialization; ////// /// public class XmlSchemaObjectCollection : CollectionBase { XmlSchemaObject parent; ///[To be supplied.] ////// /// public XmlSchemaObjectCollection() { } ///[To be supplied.] ////// /// public XmlSchemaObjectCollection(XmlSchemaObject parent) { this.parent = parent; } ///[To be supplied.] ////// /// public virtual XmlSchemaObject this[int index] { get { return (XmlSchemaObject)List[index]; } set { List[index] = value; } } ///[To be supplied.] ////// /// public new XmlSchemaObjectEnumerator GetEnumerator() { return new XmlSchemaObjectEnumerator(InnerList.GetEnumerator()); } ///[To be supplied.] ////// /// public int Add(XmlSchemaObject item) { return List.Add(item); } ///[To be supplied.] ////// /// public void Insert(int index, XmlSchemaObject item) { List.Insert(index, item); } ///[To be supplied.] ////// /// public int IndexOf(XmlSchemaObject item) { return List.IndexOf(item); } ///[To be supplied.] ////// /// public bool Contains(XmlSchemaObject item) { return List.Contains(item); } ///[To be supplied.] ////// /// public void Remove(XmlSchemaObject item) { List.Remove(item); } ///[To be supplied.] ////// /// public void CopyTo(XmlSchemaObject[] array, int index) { List.CopyTo(array, index); } ///[To be supplied.] ////// /// protected override void OnInsert(int index, object item) { if (parent != null) { parent.OnAdd(this, item); } } ///[To be supplied.] ////// /// protected override void OnSet(int index, object oldValue, object newValue) { if (parent != null) { parent.OnRemove(this, oldValue); parent.OnAdd(this, newValue); } } ///[To be supplied.] ////// /// protected override void OnClear() { if (parent != null) { parent.OnClear(this); } } ///[To be supplied.] ////// /// protected override void OnRemove(int index, object item) { if (parent != null) { parent.OnRemove(this, item); } } internal XmlSchemaObjectCollection Clone() { XmlSchemaObjectCollection coll = new XmlSchemaObjectCollection(); coll.Add(this); return coll; } private void Add(XmlSchemaObjectCollection collToAdd) { this.InnerList.InsertRange(0, collToAdd); } } ///[To be supplied.] ////// /// public class XmlSchemaObjectEnumerator: IEnumerator { IEnumerator enumerator; internal XmlSchemaObjectEnumerator( IEnumerator enumerator ) { this.enumerator = enumerator; } ///[To be supplied.] ////// /// public void Reset() { enumerator.Reset(); } ///[To be supplied.] ////// /// public bool MoveNext() { return enumerator.MoveNext(); } ///[To be supplied.] ////// /// public XmlSchemaObject Current { get { return (XmlSchemaObject)enumerator.Current; } } ///[To be supplied.] ////// void IEnumerator.Reset() { enumerator.Reset(); } /// /// bool IEnumerator.MoveNext() { return enumerator.MoveNext(); } /// /// object IEnumerator.Current { get { return enumerator.Current; } } } } // 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
- Int16.cs
- ReaderWriterLockWrapper.cs
- SmtpFailedRecipientException.cs
- login.cs
- ParameterToken.cs
- X509CertificateTrustedIssuerElementCollection.cs
- TreeWalker.cs
- HandlerFactoryCache.cs
- TextBox.cs
- IsolatedStorageException.cs
- RequestSecurityTokenResponseCollection.cs
- CompiledXpathExpr.cs
- ScrollEvent.cs
- HMACRIPEMD160.cs
- HtmlTableCellCollection.cs
- MultiBindingExpression.cs
- ClientFormsIdentity.cs
- ZipIOExtraFieldElement.cs
- DataGridViewToolTip.cs
- ProxyHelper.cs
- _ContextAwareResult.cs
- Rotation3DAnimationBase.cs
- StorageMappingItemCollection.cs
- DBParameter.cs
- TabPanel.cs
- ProvidePropertyAttribute.cs
- DiscoveryMessageSequence11.cs
- FunctionImportMapping.cs
- SafeEventLogReadHandle.cs
- localization.cs
- MetadataCache.cs
- XpsPartBase.cs
- PropertyDescriptor.cs
- DrawingBrush.cs
- DataGridViewCellLinkedList.cs
- SerialReceived.cs
- EntityContainerEmitter.cs
- PasswordRecoveryDesigner.cs
- PropertyRef.cs
- TabItem.cs
- ResourceKey.cs
- DSACryptoServiceProvider.cs
- Function.cs
- QilInvokeLateBound.cs
- IPAddressCollection.cs
- DataGridRowAutomationPeer.cs
- MetadataHelper.cs
- GeneralTransformGroup.cs
- SmiSettersStream.cs
- HttpRuntimeSection.cs
- IndicFontClient.cs
- LabelInfo.cs
- EntityDataSource.cs
- FocusChangedEventArgs.cs
- DefinitionBase.cs
- Classification.cs
- ToolStripContainerActionList.cs
- SspiSecurityTokenProvider.cs
- XmlAttributeCache.cs
- HttpEncoderUtility.cs
- autovalidator.cs
- ParameterBinding.cs
- FragmentQuery.cs
- DocumentViewerConstants.cs
- TextReturnReader.cs
- DecimalAnimationUsingKeyFrames.cs
- StorageMappingItemCollection.cs
- Compress.cs
- ErrorHandler.cs
- DataControlFieldCell.cs
- ChangeInterceptorAttribute.cs
- Common.cs
- UInt32Converter.cs
- CodeCompileUnit.cs
- DataGridViewSelectedRowCollection.cs
- TransactionValidationBehavior.cs
- Single.cs
- PrintDialogException.cs
- ItemsControlAutomationPeer.cs
- Transform3D.cs
- XmlUnspecifiedAttribute.cs
- Setter.cs
- StateDesigner.CommentLayoutGlyph.cs
- MethodSignatureGenerator.cs
- RenderDataDrawingContext.cs
- ArraySortHelper.cs
- RuntimeArgumentHandle.cs
- ToolStripSplitButton.cs
- PointHitTestResult.cs
- MessageDecoder.cs
- PrintEvent.cs
- BuildDependencySet.cs
- SoapTypeAttribute.cs
- QueryCursorEventArgs.cs
- HttpRuntime.cs
- NamespaceCollection.cs
- ExtensibleClassFactory.cs
- ClaimComparer.cs
- ChannelEndpointElementCollection.cs
- RunClient.cs