Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / xsp / System / Web / UI / WebControls / XmlHierarchicalEnumerable.cs / 5 / 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
- DataBoundControlAdapter.cs
- _RequestCacheProtocol.cs
- RawKeyboardInputReport.cs
- TrackingServices.cs
- SqlMetaData.cs
- ServiceDebugElement.cs
- MasterPageParser.cs
- StrokeNodeOperations2.cs
- BuilderInfo.cs
- BitmapEffectInputData.cs
- EncryptedKey.cs
- ObjectDataSourceView.cs
- SyndicationDeserializer.cs
- TableStyle.cs
- BevelBitmapEffect.cs
- Effect.cs
- WpfGeneratedKnownTypes.cs
- webbrowsersite.cs
- GridViewDeleteEventArgs.cs
- AlphaSortedEnumConverter.cs
- WmlPanelAdapter.cs
- Int16Converter.cs
- PropertySourceInfo.cs
- ModifyActivitiesPropertyDescriptor.cs
- TagNameToTypeMapper.cs
- StringReader.cs
- UnsafeNativeMethods.cs
- ContextBase.cs
- BulletDecorator.cs
- OwnerDrawPropertyBag.cs
- MailMessage.cs
- HttpCapabilitiesSectionHandler.cs
- UpdatePanel.cs
- SqlXmlStorage.cs
- Rules.cs
- TimelineGroup.cs
- ErrorHandlingAcceptor.cs
- X509Certificate2.cs
- RegexMatch.cs
- TypeBuilderInstantiation.cs
- Expander.cs
- WindowsListView.cs
- SqlStatistics.cs
- Baml6ConstructorInfo.cs
- BufferModesCollection.cs
- ChildTable.cs
- SimpleTableProvider.cs
- EdgeProfileValidation.cs
- RIPEMD160.cs
- Journaling.cs
- DataRecord.cs
- SRGSCompiler.cs
- FloaterParaClient.cs
- DetailsViewDeleteEventArgs.cs
- TreeNodeSelectionProcessor.cs
- RuleConditionDialog.Designer.cs
- FileLogRecord.cs
- Restrictions.cs
- TraceUtility.cs
- ObjectSecurity.cs
- TextFormatter.cs
- DataSourceHelper.cs
- XmlSchemaComplexContentExtension.cs
- NameValueFileSectionHandler.cs
- ArraySortHelper.cs
- SqlInternalConnectionSmi.cs
- VScrollBar.cs
- AddInAttribute.cs
- ReferenceEqualityComparer.cs
- figurelength.cs
- CTreeGenerator.cs
- OrderedHashRepartitionStream.cs
- Assert.cs
- XNodeValidator.cs
- DBCommand.cs
- CustomErrorsSection.cs
- HtmlInputFile.cs
- DesignerAttribute.cs
- WaitHandleCannotBeOpenedException.cs
- RegionIterator.cs
- SqlProviderUtilities.cs
- KnownTypesProvider.cs
- Guid.cs
- TemplateContentLoader.cs
- EditorAttributeInfo.cs
- RtfControls.cs
- ToolboxItemCollection.cs
- DataConnectionHelper.cs
- ColorKeyFrameCollection.cs
- ListViewTableRow.cs
- IncrementalCompileAnalyzer.cs
- ScrollBarRenderer.cs
- CreatingCookieEventArgs.cs
- BufferedGraphics.cs
- ScriptReferenceEventArgs.cs
- GestureRecognizer.cs
- CommandHelpers.cs
- EditorPartCollection.cs
- ScriptServiceAttribute.cs
- MessageSecurityProtocol.cs