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;
///
///
/// [To be supplied.]
///
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; }
}
///
///
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;
///
///
/// [To be supplied.]
///
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; }
}
///
///
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
- HexParser.cs
- HttpGetProtocolImporter.cs
- ConfigXmlWhitespace.cs
- ItemCheckedEvent.cs
- TreeNode.cs
- PerformanceCounterLib.cs
- StagingAreaInputItem.cs
- TreeNodeCollection.cs
- CLRBindingWorker.cs
- TemplatePagerField.cs
- ProxyAttribute.cs
- C14NUtil.cs
- UIElement3D.cs
- FixedElement.cs
- SectionUpdates.cs
- CalendarModeChangedEventArgs.cs
- DbMetaDataFactory.cs
- GridViewColumnHeaderAutomationPeer.cs
- NamedPipeProcessProtocolHandler.cs
- EncoderExceptionFallback.cs
- ActivitySurrogate.cs
- ServicePointManager.cs
- PropertyGridCommands.cs
- WpfMemberInvoker.cs
- WebExceptionStatus.cs
- AsyncOperation.cs
- AnnotationResource.cs
- DbConnectionOptions.cs
- DesignColumnCollection.cs
- HttpDebugHandler.cs
- WindowsSecurityToken.cs
- WebPartActionVerb.cs
- FacetValueContainer.cs
- FileRecordSequence.cs
- OdbcPermission.cs
- DeploymentExceptionMapper.cs
- SiteMapProvider.cs
- PersistenceTypeAttribute.cs
- PackWebRequest.cs
- Panel.cs
- _SSPISessionCache.cs
- StringInfo.cs
- DataGridViewRowConverter.cs
- ModelItemCollection.cs
- XmlNullResolver.cs
- SamlEvidence.cs
- TokenFactoryCredential.cs
- UriExt.cs
- XmlMtomReader.cs
- GlyphShapingProperties.cs
- SoapAttributeAttribute.cs
- RelationshipFixer.cs
- Attributes.cs
- ProtocolsSection.cs
- TrackingMemoryStreamFactory.cs
- DNS.cs
- ScriptingSectionGroup.cs
- DropAnimation.xaml.cs
- ElementAction.cs
- _Win32.cs
- ObjectView.cs
- SecurityResources.cs
- SafeNativeMethods.cs
- PageWrapper.cs
- UncommonField.cs
- ImpersonationContext.cs
- TrustLevel.cs
- CompilationLock.cs
- RawStylusInputCustomDataList.cs
- BuildTopDownAttribute.cs
- EventNotify.cs
- HTTPAPI_VERSION.cs
- HtmlGenericControl.cs
- _HeaderInfo.cs
- ListSortDescriptionCollection.cs
- Knowncolors.cs
- CultureInfoConverter.cs
- WindowsListViewScroll.cs
- RoleServiceManager.cs
- TemplateContainer.cs
- FrameSecurityDescriptor.cs
- handlecollector.cs
- ExclusiveCanonicalizationTransform.cs
- Predicate.cs
- DataViewManager.cs
- PermissionListSet.cs
- MediaSystem.cs
- ZipIOExtraFieldPaddingElement.cs
- ResolveNameEventArgs.cs
- DataGridViewMethods.cs
- AmbiguousMatchException.cs
- Rectangle.cs
- NodeFunctions.cs
- TranslateTransform.cs
- TextEditorSpelling.cs
- HtmlShimManager.cs
- CacheMemory.cs
- ContractMethodInfo.cs
- SiteMapNodeItemEventArgs.cs
- AnnotationResourceChangedEventArgs.cs