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
- WebPartDescriptionCollection.cs
- HttpCookieCollection.cs
- SafeProcessHandle.cs
- HttpWrapper.cs
- AssemblySettingAttributes.cs
- Convert.cs
- XappLauncher.cs
- ContentElementCollection.cs
- SimpleExpression.cs
- WebContentFormatHelper.cs
- ACL.cs
- ArcSegment.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- MetadataPropertyvalue.cs
- Substitution.cs
- SendContent.cs
- WrappedDispatcherException.cs
- CustomAttributeBuilder.cs
- FileDetails.cs
- ModuleConfigurationInfo.cs
- AttachmentService.cs
- IxmlLineInfo.cs
- XmlAttributeOverrides.cs
- SqlGenericUtil.cs
- TextSchema.cs
- FrameworkTemplate.cs
- RangeBase.cs
- StorageEntityContainerMapping.cs
- VirtualPath.cs
- IMembershipProvider.cs
- DeclaredTypeValidator.cs
- ProcessProtocolHandler.cs
- CreateWorkflowOwnerCommand.cs
- _NativeSSPI.cs
- ArrayExtension.cs
- MatrixUtil.cs
- AsymmetricKeyExchangeDeformatter.cs
- MsmqIntegrationInputMessage.cs
- ClientApiGenerator.cs
- EntitySetRetriever.cs
- CryptographicAttribute.cs
- ChangePasswordAutoFormat.cs
- TextElementEnumerator.cs
- StringValueSerializer.cs
- TypeValidationEventArgs.cs
- WindowsFormsLinkLabel.cs
- HostExecutionContextManager.cs
- RevocationPoint.cs
- BidirectionalDictionary.cs
- Rectangle.cs
- ProxyHwnd.cs
- DataGridViewColumnStateChangedEventArgs.cs
- TransformConverter.cs
- ManagementScope.cs
- CalendarDay.cs
- DataGridTable.cs
- ListDependantCardsRequest.cs
- WriteTimeStream.cs
- CharacterMetrics.cs
- MsmqHostedTransportManager.cs
- ColorTransform.cs
- HitTestDrawingContextWalker.cs
- Profiler.cs
- RegexGroup.cs
- sqlser.cs
- ConfigXmlSignificantWhitespace.cs
- ComNativeDescriptor.cs
- DelegatingTypeDescriptionProvider.cs
- HtmlHistory.cs
- ModelTypeConverter.cs
- HtmlInputFile.cs
- CreateCardRequest.cs
- Ipv6Element.cs
- WmlTextBoxAdapter.cs
- HttpServerVarsCollection.cs
- ResourcesBuildProvider.cs
- Transform3D.cs
- HtmlPanelAdapter.cs
- XmlSchemaSimpleContentExtension.cs
- ModelTreeManager.cs
- CodeAttributeDeclaration.cs
- SettingsProperty.cs
- PathFigure.cs
- BitmapPalettes.cs
- XsltException.cs
- Canvas.cs
- EventLogWatcher.cs
- DeferredReference.cs
- ObjectViewListener.cs
- Pkcs9Attribute.cs
- FixedFindEngine.cs
- WebPartMenuStyle.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- ThaiBuddhistCalendar.cs
- StringResourceManager.cs
- WebPartEditorCancelVerb.cs
- TokenBasedSetEnumerator.cs
- safePerfProviderHandle.cs
- Number.cs
- UTF32Encoding.cs