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
- SelectedDatesCollection.cs
- AnimationLayer.cs
- TraceRecord.cs
- ErasingStroke.cs
- RichTextBoxConstants.cs
- DbDataSourceEnumerator.cs
- ListenerServiceInstallComponent.cs
- CodeMethodReturnStatement.cs
- ApplyImportsAction.cs
- LocatorPart.cs
- TimeSpanConverter.cs
- SqlParameter.cs
- EnumCodeDomSerializer.cs
- ResolvedKeyFrameEntry.cs
- SecurityDocument.cs
- BinaryMessageFormatter.cs
- RoutingExtension.cs
- CheckBoxFlatAdapter.cs
- RoleManagerEventArgs.cs
- PropertyInfoSet.cs
- SelectionEditingBehavior.cs
- PropertyMapper.cs
- SafeFileHandle.cs
- DescriptionAttribute.cs
- EmbeddedMailObjectsCollection.cs
- ReachSerializer.cs
- MessageContractExporter.cs
- TextPointer.cs
- ActivityCollectionMarkupSerializer.cs
- SimpleRecyclingCache.cs
- ListViewDeletedEventArgs.cs
- PresentationTraceSources.cs
- FlowDocumentFormatter.cs
- XmlAtomicValue.cs
- RootProfilePropertySettingsCollection.cs
- ToolTip.cs
- XmlTextReader.cs
- ArrayElementGridEntry.cs
- ResourceDisplayNameAttribute.cs
- HandlerFactoryCache.cs
- MonitoringDescriptionAttribute.cs
- TargetConverter.cs
- QueryReaderSettings.cs
- TransactionManager.cs
- EditorAttributeInfo.cs
- ResourcePool.cs
- ConnectionPointConverter.cs
- CompModSwitches.cs
- QilStrConcat.cs
- Update.cs
- DocumentViewerHelper.cs
- NumberEdit.cs
- FontWeight.cs
- SessionStateModule.cs
- WindowsUserNameSecurityTokenAuthenticator.cs
- XComponentModel.cs
- LiteralDesigner.cs
- AsnEncodedData.cs
- IntegrationExceptionEventArgs.cs
- DataGridViewColumnDesignTimeVisibleAttribute.cs
- SortedList.cs
- BitmapEffectInput.cs
- Unit.cs
- CryptoStream.cs
- SkewTransform.cs
- XmlIlTypeHelper.cs
- LabelAutomationPeer.cs
- JoinGraph.cs
- WorkflowInstanceExtensionCollection.cs
- ToolBarButtonDesigner.cs
- HexParser.cs
- VirtualizingPanel.cs
- ZipQueryOperator.cs
- SamlSubjectStatement.cs
- ColumnResizeAdorner.cs
- XmlDictionaryWriter.cs
- ActiveXContainer.cs
- TextBoxDesigner.cs
- ExpressionSelection.cs
- SecurityResources.cs
- DataServiceProcessingPipeline.cs
- OwnerDrawPropertyBag.cs
- RenderingEventArgs.cs
- ObjectStateEntry.cs
- ContextMarshalException.cs
- DesignerUtility.cs
- AppDomainManager.cs
- StrongName.cs
- CellCreator.cs
- ProxyBuilder.cs
- ValidationErrorEventArgs.cs
- SecurityPermission.cs
- StateMachineSubscriptionManager.cs
- DataControlField.cs
- ResourceDefaultValueAttribute.cs
- IndexOutOfRangeException.cs
- HTTPAPI_VERSION.cs
- Decoder.cs
- MailDefinition.cs
- Section.cs