Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / xsp / System / Web / UI / WebControls / XmlHierarchicalEnumerable.cs / 1 / 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. // //----------------------------------------------------------------------------- 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- HtmlToClrEventProxy.cs
- CompModSwitches.cs
- CompilationRelaxations.cs
- FontCacheLogic.cs
- DiscoveryDocumentSearchPattern.cs
- NonSerializedAttribute.cs
- NopReturnReader.cs
- UserUseLicenseDictionaryLoader.cs
- SpecialTypeDataContract.cs
- Helper.cs
- TranslateTransform3D.cs
- WebBaseEventKeyComparer.cs
- OleDbConnectionInternal.cs
- TrackBar.cs
- IdentityHolder.cs
- OdbcEnvironment.cs
- MSAAEventDispatcher.cs
- control.ime.cs
- WizardDesigner.cs
- ListView.cs
- CanonicalFormWriter.cs
- PrintPreviewDialog.cs
- ExpressionBuilderCollection.cs
- NullableIntAverageAggregationOperator.cs
- TagPrefixAttribute.cs
- WindowsUpDown.cs
- PointLight.cs
- Transform3D.cs
- ItemsPanelTemplate.cs
- ContextStack.cs
- GeometryCollection.cs
- regiisutil.cs
- GridViewPageEventArgs.cs
- SQLMoneyStorage.cs
- SortKey.cs
- ToolStripDropDownDesigner.cs
- JoinSymbol.cs
- xmlfixedPageInfo.cs
- SqlServer2KCompatibilityCheck.cs
- FixedSOMElement.cs
- COSERVERINFO.cs
- Icon.cs
- ClientTargetCollection.cs
- ValueOfAction.cs
- _ConnectOverlappedAsyncResult.cs
- DialogWindow.cs
- FixedSOMImage.cs
- DocumentXmlWriter.cs
- RawTextInputReport.cs
- HttpWebResponse.cs
- TrackingExtract.cs
- TextAction.cs
- ToolStripSeparatorRenderEventArgs.cs
- TraceContextEventArgs.cs
- SmiContext.cs
- SelectionListComponentEditor.cs
- SmtpFailedRecipientException.cs
- DTCTransactionManager.cs
- WsatExtendedInformation.cs
- SnapshotChangeTrackingStrategy.cs
- X509SecurityTokenParameters.cs
- GcSettings.cs
- SmiEventSink_DeferedProcessing.cs
- DynamicILGenerator.cs
- DataPagerFieldCollection.cs
- PaginationProgressEventArgs.cs
- ExternalException.cs
- PauseStoryboard.cs
- WizardSideBarListControlItemEventArgs.cs
- OleDbConnection.cs
- EventMap.cs
- CompletedAsyncResult.cs
- MoveSizeWinEventHandler.cs
- NameValueFileSectionHandler.cs
- HandlerWithFactory.cs
- DataSourceControl.cs
- XsltContext.cs
- FrameworkContentElement.cs
- ObjectDataSourceMethodEventArgs.cs
- CanonicalFontFamilyReference.cs
- SqlTransaction.cs
- Object.cs
- PrintPreviewGraphics.cs
- TimeoutException.cs
- CatalogZoneBase.cs
- SafeFileMapViewHandle.cs
- ComponentChangedEvent.cs
- UriTemplateTrieNode.cs
- CodeAttributeArgumentCollection.cs
- DataRowComparer.cs
- ScrollChrome.cs
- Switch.cs
- DataControlField.cs
- SignHashRequest.cs
- DependencyPropertyKey.cs
- BaseCodePageEncoding.cs
- MeshGeometry3D.cs
- EventBuilder.cs
- DeviceContext2.cs
- ConfigXmlReader.cs