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
- SignedInfo.cs
- BaseDataListComponentEditor.cs
- Symbol.cs
- PipelineModuleStepContainer.cs
- TypeToken.cs
- GlyphInfoList.cs
- StringInfo.cs
- SafeNativeMethods.cs
- MbpInfo.cs
- XmlBufferReader.cs
- SimpleWebHandlerParser.cs
- FormattedTextSymbols.cs
- ProviderCommandInfoUtils.cs
- HttpListenerRequest.cs
- GenericIdentity.cs
- MSHTMLHost.cs
- unsafeIndexingFilterStream.cs
- UrlMapping.cs
- WebSysDescriptionAttribute.cs
- ChannelServices.cs
- Process.cs
- CriticalHandle.cs
- ProfileManager.cs
- EdmScalarPropertyAttribute.cs
- InternalBase.cs
- UniqueIdentifierService.cs
- InvokeGenerator.cs
- TimeSpanValidatorAttribute.cs
- SharedHttpsTransportManager.cs
- TextFormatter.cs
- ExtendedPropertyCollection.cs
- XslException.cs
- FileSecurity.cs
- FlowDecisionDesigner.xaml.cs
- WebPartVerbsEventArgs.cs
- InputLanguageManager.cs
- GridView.cs
- EpmTargetPathSegment.cs
- CancellationHandlerDesigner.cs
- NativeMethodsCLR.cs
- SubstitutionList.cs
- StyleXamlParser.cs
- DesignerView.xaml.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- Point4DConverter.cs
- ResolveResponse.cs
- DetailsViewUpdateEventArgs.cs
- TextRangeBase.cs
- PropertyNames.cs
- SystemColorTracker.cs
- OledbConnectionStringbuilder.cs
- TypeConverter.cs
- XhtmlBasicSelectionListAdapter.cs
- CatalogPart.cs
- ContentFilePart.cs
- WebPartMovingEventArgs.cs
- FilteredDataSetHelper.cs
- SaveFileDialog.cs
- InternalSafeNativeMethods.cs
- ObfuscateAssemblyAttribute.cs
- LoadRetryStrategyFactory.cs
- EmptyStringExpandableObjectConverter.cs
- Bitmap.cs
- EnumMember.cs
- MULTI_QI.cs
- PenThreadWorker.cs
- TimeSpanValidatorAttribute.cs
- ToolStripItemDesigner.cs
- SmtpAuthenticationManager.cs
- WebServiceTypeData.cs
- FigureParaClient.cs
- CngAlgorithm.cs
- StrongNameUtility.cs
- Localizer.cs
- InvokeBinder.cs
- CodeAccessSecurityEngine.cs
- DataContractSerializerServiceBehavior.cs
- ListBindingConverter.cs
- ArrangedElementCollection.cs
- ResourceWriter.cs
- SystemFonts.cs
- UInt16.cs
- PartialCachingControl.cs
- MasterPageBuildProvider.cs
- AutomationPropertyInfo.cs
- IPEndPointCollection.cs
- Visitor.cs
- DispatchChannelSink.cs
- DurableEnlistmentState.cs
- RegexTypeEditor.cs
- HighlightVisual.cs
- BamlMapTable.cs
- PrivilegeNotHeldException.cs
- MarginCollapsingState.cs
- TextCompositionManager.cs
- OnOperation.cs
- QilFactory.cs
- OleDbSchemaGuid.cs
- TagPrefixCollection.cs
- CfgParser.cs