Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / ndp / fx / src / xsp / System / Web / UI / WebControls / XmlHierarchicalEnumerable.cs / 2 / XmlHierarchicalEnumerable.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls { using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Drawing.Design; using System.Text; using System.Web; using System.Web.UI; using System.Xml; ////// An enumerable representing a single level of an XmlHierarchicalDataSourceView. /// internal sealed class XmlHierarchicalEnumerable : IHierarchicalEnumerable { private string _path; private XmlNodeList _nodeList; ////// Creates a new instance of XmlHierarchicalEnumerable. /// internal XmlHierarchicalEnumerable(XmlNodeList nodeList) { _nodeList = nodeList; } internal string Path { get { return _path; } set { _path = value; } } IEnumerator IEnumerable.GetEnumerator() { foreach (XmlNode node in _nodeList) { if (node.NodeType == XmlNodeType.Element) { yield return new XmlHierarchyData(this, node); } } } IHierarchyData IHierarchicalEnumerable.GetHierarchyData(object enumeratedItem) { return (IHierarchyData)enumeratedItem; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls { using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Drawing.Design; using System.Text; using System.Web; using System.Web.UI; using System.Xml; ////// An enumerable representing a single level of an XmlHierarchicalDataSourceView. /// internal sealed class XmlHierarchicalEnumerable : IHierarchicalEnumerable { private string _path; private XmlNodeList _nodeList; ////// Creates a new instance of XmlHierarchicalEnumerable. /// internal XmlHierarchicalEnumerable(XmlNodeList nodeList) { _nodeList = nodeList; } internal string Path { get { return _path; } set { _path = value; } } IEnumerator IEnumerable.GetEnumerator() { foreach (XmlNode node in _nodeList) { if (node.NodeType == XmlNodeType.Element) { yield return new XmlHierarchyData(this, node); } } } IHierarchyData IHierarchicalEnumerable.GetHierarchyData(object enumeratedItem) { return (IHierarchyData)enumeratedItem; } } } // 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
- BaseTemplateBuildProvider.cs
- XmlSerializationWriter.cs
- Mutex.cs
- Constant.cs
- CellTreeNode.cs
- ExpressionNode.cs
- HttpListenerContext.cs
- IDReferencePropertyAttribute.cs
- PathFigure.cs
- IOException.cs
- AttributeAction.cs
- LinqDataSourceUpdateEventArgs.cs
- StateBag.cs
- LayoutUtils.cs
- GlyphCollection.cs
- XmlBinaryWriter.cs
- WSTrustFeb2005.cs
- IntersectQueryOperator.cs
- XsltConvert.cs
- Vector3DConverter.cs
- XamlSerializationHelper.cs
- SynchronizedInputAdaptor.cs
- StdValidatorsAndConverters.cs
- Form.cs
- _DigestClient.cs
- ModelItemExtensions.cs
- LocatorBase.cs
- CodeValidator.cs
- BitmapScalingModeValidation.cs
- XmlBufferReader.cs
- AstTree.cs
- ClockController.cs
- TrackingDataItem.cs
- DataGridToolTip.cs
- LogicalMethodInfo.cs
- StringComparer.cs
- SessionStateContainer.cs
- ToolStripTextBox.cs
- HttpCacheVary.cs
- BaseDataBoundControl.cs
- NegationPusher.cs
- NetStream.cs
- DescendentsWalkerBase.cs
- Regex.cs
- UniformGrid.cs
- XsdDataContractExporter.cs
- SymLanguageType.cs
- Listbox.cs
- NumberFunctions.cs
- WindowsScroll.cs
- JapaneseLunisolarCalendar.cs
- DataGridrowEditEndingEventArgs.cs
- InternalPermissions.cs
- ListMarkerSourceInfo.cs
- FastPropertyAccessor.cs
- NameTable.cs
- TrackingValidationObjectDictionary.cs
- UniqueIdentifierService.cs
- ServerType.cs
- NegationPusher.cs
- TextDecorations.cs
- GradientStop.cs
- SecurityState.cs
- DataGridViewRowHeaderCell.cs
- ToolZoneDesigner.cs
- Identity.cs
- shaperfactory.cs
- AnnotationComponentManager.cs
- MatrixTransform3D.cs
- DataGridViewUtilities.cs
- ReceiveMessageRecord.cs
- IncrementalHitTester.cs
- ToolboxItemLoader.cs
- ProcessModelInfo.cs
- BookmarkScopeManager.cs
- IdleTimeoutMonitor.cs
- SafeCryptoHandles.cs
- CodeDirectoryCompiler.cs
- FieldBuilder.cs
- CatalogPartCollection.cs
- PropertyKey.cs
- RuleSetBrowserDialog.cs
- CellPartitioner.cs
- SelectionRange.cs
- StylusPointProperties.cs
- PreviousTrackingServiceAttribute.cs
- ToolStripItemGlyph.cs
- View.cs
- CompiledXpathExpr.cs
- FieldTemplateFactory.cs
- OdbcEnvironmentHandle.cs
- Baml6ConstructorInfo.cs
- StrongNameUtility.cs
- ProfileSection.cs
- HostingEnvironmentSection.cs
- BaseCollection.cs
- WindowsFont.cs
- FixedSOMTableRow.cs
- WindowsStatusBar.cs
- SessionEndingEventArgs.cs