Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / WebControls / XmlHierarchicalEnumerable.cs / 1305376 / 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
- SolidBrush.cs
- ElementHostAutomationPeer.cs
- NativeMethods.cs
- OracleFactory.cs
- DataGridViewColumnCollectionDialog.cs
- AssemblyContextControlItem.cs
- HostVisual.cs
- SqlXmlStorage.cs
- Ipv6Element.cs
- HtmlElementErrorEventArgs.cs
- HuffmanTree.cs
- WindowsBrush.cs
- Int64Converter.cs
- IChannel.cs
- DataGridLinkButton.cs
- ServerValidateEventArgs.cs
- DataColumnSelectionConverter.cs
- LinkDescriptor.cs
- Configuration.cs
- InternalConfigConfigurationFactory.cs
- ToolStripContainer.cs
- DrawListViewSubItemEventArgs.cs
- ColorTransform.cs
- OptionUsage.cs
- SystemColors.cs
- DocumentXPathNavigator.cs
- CustomBinding.cs
- CompModSwitches.cs
- EditingMode.cs
- SqlPersonalizationProvider.cs
- CheckBoxStandardAdapter.cs
- ErrorTolerantObjectWriter.cs
- DefaultDialogButtons.cs
- XamlSerializationHelper.cs
- CodeDirectoryCompiler.cs
- HandlerMappingMemo.cs
- BasicCellRelation.cs
- XmlSchemaComplexContentRestriction.cs
- RawStylusInputCustomDataList.cs
- DiscoveryReferences.cs
- _LocalDataStore.cs
- TextParentUndoUnit.cs
- CellIdBoolean.cs
- Function.cs
- GAC.cs
- ProcessHostConfigUtils.cs
- WorkflowQueue.cs
- UIPropertyMetadata.cs
- StoragePropertyMapping.cs
- ProcessModuleCollection.cs
- PreloadedPackages.cs
- wgx_sdk_version.cs
- InitializationEventAttribute.cs
- BitmapEffectGroup.cs
- ConfigXmlAttribute.cs
- OleDbConnectionInternal.cs
- OledbConnectionStringbuilder.cs
- EndpointAddressAugust2004.cs
- RectangleF.cs
- ApplicationFileCodeDomTreeGenerator.cs
- ServiceThrottle.cs
- Speller.cs
- RelationshipManager.cs
- SHA384Cng.cs
- SeverityFilter.cs
- input.cs
- BitSet.cs
- TextBox.cs
- DataTableMapping.cs
- MailAddressCollection.cs
- Matrix3D.cs
- ToolStripPanelRenderEventArgs.cs
- AutomationProperty.cs
- ResourceProperty.cs
- LogSwitch.cs
- RankException.cs
- ConfigXmlCDataSection.cs
- Utilities.cs
- CapacityStreamGeometryContext.cs
- ImageClickEventArgs.cs
- SiteMapNodeCollection.cs
- SingleKeyFrameCollection.cs
- FocusWithinProperty.cs
- SqlNotificationEventArgs.cs
- PageAsyncTask.cs
- ReadWriteSpinLock.cs
- System.Data_BID.cs
- ScriptingAuthenticationServiceSection.cs
- XmlWhitespace.cs
- RawAppCommandInputReport.cs
- GenericAuthenticationEventArgs.cs
- ToolboxComponentsCreatingEventArgs.cs
- NoPersistScope.cs
- ToolStripStatusLabel.cs
- ViewGenResults.cs
- AjaxFrameworkAssemblyAttribute.cs
- PrintPageEvent.cs
- ProcessHostFactoryHelper.cs
- VBIdentifierName.cs
- BufferedOutputAsyncStream.cs