Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / ndp / fx / src / xsp / System / Web / UI / WebControls / XmlHierarchicalEnumerable.cs / 2 / 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. //------------------------------------------------------------------------------ //// 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- EventWaitHandle.cs
- Debugger.cs
- HitTestWithPointDrawingContextWalker.cs
- UshortList2.cs
- LinkLabel.cs
- ParallelActivityDesigner.cs
- NetTcpSecurityElement.cs
- UIElement3DAutomationPeer.cs
- BaseResourcesBuildProvider.cs
- ColumnResizeAdorner.cs
- SqlDataSourceFilteringEventArgs.cs
- WsiProfilesElementCollection.cs
- LambdaCompiler.Statements.cs
- Point3D.cs
- WindowsPen.cs
- cookie.cs
- OdbcConnectionStringbuilder.cs
- Stylesheet.cs
- TaskFileService.cs
- URIFormatException.cs
- RawTextInputReport.cs
- BufferModesCollection.cs
- ValidationErrorCollection.cs
- WindowPattern.cs
- TypedColumnHandler.cs
- OutputCacheSection.cs
- HyperLink.cs
- DocumentReference.cs
- DesignerTextViewAdapter.cs
- TextCompositionEventArgs.cs
- SqlDataSourceEnumerator.cs
- ConsoleCancelEventArgs.cs
- Claim.cs
- VBCodeProvider.cs
- OneOfConst.cs
- XamlPoint3DCollectionSerializer.cs
- EncryptedPackage.cs
- Msec.cs
- CachedResourceDictionaryExtension.cs
- SHA1Managed.cs
- WebPartMovingEventArgs.cs
- XmlDomTextWriter.cs
- SymLanguageType.cs
- PointLightBase.cs
- HttpWebRequestElement.cs
- HwndHostAutomationPeer.cs
- RootDesignerSerializerAttribute.cs
- SortAction.cs
- FragmentQuery.cs
- Certificate.cs
- BooleanExpr.cs
- LoginCancelEventArgs.cs
- DataViewSettingCollection.cs
- ClientData.cs
- BrowserDefinitionCollection.cs
- ReferenceEqualityComparer.cs
- WizardStepBase.cs
- IxmlLineInfo.cs
- ActivationArguments.cs
- CodePageUtils.cs
- SQLDateTime.cs
- MouseButtonEventArgs.cs
- ScrollViewerAutomationPeer.cs
- Util.cs
- ImageUrlEditor.cs
- QilCloneVisitor.cs
- RegexInterpreter.cs
- SelectedCellsCollection.cs
- HttpNamespaceReservationInstallComponent.cs
- DynamicActivityXamlReader.cs
- LiteralControl.cs
- ADMembershipProvider.cs
- AttributeProviderAttribute.cs
- NameValueCollection.cs
- PartBasedPackageProperties.cs
- MetadataCache.cs
- UmAlQuraCalendar.cs
- JoinGraph.cs
- ApplicationServicesHostFactory.cs
- COM2FontConverter.cs
- HtmlInputButton.cs
- _AcceptOverlappedAsyncResult.cs
- Query.cs
- ZipArchive.cs
- MouseWheelEventArgs.cs
- LinqDataSourceSelectEventArgs.cs
- VarInfo.cs
- TemplateControl.cs
- SQLDoubleStorage.cs
- MultipartIdentifier.cs
- ReadOnlyDictionary.cs
- ComplexLine.cs
- IpcClientManager.cs
- ExtensionMethods.cs
- OutOfProcStateClientManager.cs
- RegexTree.cs
- EventDescriptor.cs
- XamlReaderHelper.cs
- DataGridViewRowPostPaintEventArgs.cs
- InputReport.cs