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
- ContentAlignmentEditor.cs
- DebugViewWriter.cs
- IssuanceTokenProviderBase.cs
- ImageResources.Designer.cs
- TextTreePropertyUndoUnit.cs
- _LoggingObject.cs
- UnknownWrapper.cs
- EndpointDesigner.cs
- XmlTextReaderImplHelpers.cs
- AssertFilter.cs
- SqlDelegatedTransaction.cs
- InstanceHandle.cs
- Encoder.cs
- PageOutputColor.cs
- EntityClassGenerator.cs
- RangeValuePattern.cs
- COM2ColorConverter.cs
- DirtyTextRange.cs
- ObjectDesignerDataSourceView.cs
- Transform3D.cs
- UrlRoutingModule.cs
- ModelPropertyDescriptor.cs
- BitmapEffectInputConnector.cs
- altserialization.cs
- IDQuery.cs
- WebPartRestoreVerb.cs
- safelink.cs
- XmlAttributes.cs
- NetStream.cs
- EntityContainer.cs
- ClaimSet.cs
- RuntimeIdentifierPropertyAttribute.cs
- Application.cs
- WpfPayload.cs
- MaskedTextProvider.cs
- EnterpriseServicesHelper.cs
- RegexCaptureCollection.cs
- StructuralCache.cs
- ShaperBuffers.cs
- RuntimeResourceSet.cs
- EventLogger.cs
- ExceptionHelpers.cs
- SmtpNegotiateAuthenticationModule.cs
- DocumentSequenceHighlightLayer.cs
- ContainerParagraph.cs
- PointAnimationClockResource.cs
- DelegateBodyWriter.cs
- SecurityTokenResolver.cs
- TextLineResult.cs
- SelectionItemProviderWrapper.cs
- RenameRuleObjectDialog.cs
- QueryOperatorEnumerator.cs
- PackWebRequest.cs
- OledbConnectionStringbuilder.cs
- QilVisitor.cs
- FrameworkTemplate.cs
- XmlSchemaAll.cs
- WindowsButton.cs
- TextCompositionEventArgs.cs
- HtmlInputRadioButton.cs
- PersistenceException.cs
- ConvertersCollection.cs
- ValidatorCompatibilityHelper.cs
- Span.cs
- RecognizerBase.cs
- SqlCacheDependencyDatabaseCollection.cs
- DTCTransactionManager.cs
- SqlConnection.cs
- _LoggingObject.cs
- TextBox.cs
- SafeNativeMethods.cs
- ReflectionTypeLoadException.cs
- Positioning.cs
- EventItfInfo.cs
- CacheDict.cs
- CqlLexerHelpers.cs
- SiteMapNodeCollection.cs
- GridLength.cs
- ParseHttpDate.cs
- SiteMapSection.cs
- ILGenerator.cs
- FamilyTypeface.cs
- Stack.cs
- Logging.cs
- MethodMessage.cs
- RuleSettings.cs
- Table.cs
- OraclePermissionAttribute.cs
- PrinterUnitConvert.cs
- FolderLevelBuildProvider.cs
- StyleCollection.cs
- AnnotationResourceCollection.cs
- PropertyMetadata.cs
- FilteredDataSetHelper.cs
- SessionPageStateSection.cs
- Calendar.cs
- UpDownEvent.cs
- DesignerActionPropertyItem.cs
- EntryWrittenEventArgs.cs
- SendMailErrorEventArgs.cs