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
- OrderedEnumerableRowCollection.cs
- ToolBar.cs
- CompilerGlobalScopeAttribute.cs
- HttpServerUtilityBase.cs
- CodeSnippetCompileUnit.cs
- Command.cs
- PropertyDescriptorCollection.cs
- ControlUtil.cs
- NativeMethods.cs
- NetTcpSecurityElement.cs
- EventLogEntry.cs
- DataSourceControlBuilder.cs
- RuntimeHandles.cs
- CaseInsensitiveComparer.cs
- ISCIIEncoding.cs
- NavigationService.cs
- SiteMapNodeItem.cs
- FilteredDataSetHelper.cs
- MailWriter.cs
- HwndAppCommandInputProvider.cs
- ReceiveActivityDesigner.cs
- Int64.cs
- Listbox.cs
- WizardPanelChangingEventArgs.cs
- Bidi.cs
- MissingMethodException.cs
- PartialTrustVisibleAssembliesSection.cs
- Vector3D.cs
- storepermissionattribute.cs
- XmlSchemaFacet.cs
- EmptyTextWriter.cs
- TextFormatterImp.cs
- WindowsImpersonationContext.cs
- VisualState.cs
- TargetPerspective.cs
- BindingContext.cs
- TreeNodeEventArgs.cs
- ReceiveActivity.cs
- TablePatternIdentifiers.cs
- SmtpFailedRecipientException.cs
- OutputScopeManager.cs
- EventLogger.cs
- DocumentPageView.cs
- ExpressionConverter.cs
- ListViewItem.cs
- InteropTrackingRecord.cs
- _UncName.cs
- UidManager.cs
- serverconfig.cs
- FocusManager.cs
- DataGridViewColumn.cs
- X509CertificateValidator.cs
- PreservationFileWriter.cs
- SqlMethodCallConverter.cs
- PageFunction.cs
- ObjectToIdCache.cs
- StringSorter.cs
- DBSchemaTable.cs
- PersonalizationDictionary.cs
- ChannelAcceptor.cs
- Resources.Designer.cs
- SortDescriptionCollection.cs
- FileDialogCustomPlace.cs
- IIS7WorkerRequest.cs
- TreeNodeSelectionProcessor.cs
- XmlKeywords.cs
- ScriptControl.cs
- TextBoxAutomationPeer.cs
- ToolBar.cs
- SynchronizedDispatch.cs
- TypeReference.cs
- StructuralCache.cs
- AncestorChangedEventArgs.cs
- RenderCapability.cs
- OdbcParameter.cs
- mansign.cs
- ValidationSummary.cs
- HMACRIPEMD160.cs
- SchemaLookupTable.cs
- RegexCharClass.cs
- ExtensionSurface.cs
- ErrorProvider.cs
- WindowsIdentity.cs
- CurrentChangedEventManager.cs
- BamlMapTable.cs
- QueryOperationResponseOfT.cs
- FacetChecker.cs
- Pen.cs
- UnwrappedTypesXmlSerializerManager.cs
- _NativeSSPI.cs
- HelpKeywordAttribute.cs
- SapiRecoInterop.cs
- EventHandlers.cs
- DocumentViewer.cs
- Int16Animation.cs
- PlaceHolder.cs
- DataControlHelper.cs
- FactoryGenerator.cs
- COM2ComponentEditor.cs
- CachedRequestParams.cs