Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- ViewStateException.cs
- MultiViewDesigner.cs
- XmlHelper.cs
- WebControlToolBoxItem.cs
- TemplatedMailWebEventProvider.cs
- DataControlPagerLinkButton.cs
- QueryStringHandler.cs
- AppSettingsReader.cs
- DocumentSchemaValidator.cs
- ElementNotAvailableException.cs
- UnmanagedBitmapWrapper.cs
- ErrorFormatter.cs
- DialogResultConverter.cs
- ByteStack.cs
- NativeMethods.cs
- ObjectToken.cs
- DataGridColumn.cs
- SrgsOneOf.cs
- SamlSecurityTokenAuthenticator.cs
- ErrorItem.cs
- UriTemplatePathSegment.cs
- Stack.cs
- Freezable.cs
- ellipse.cs
- CharacterMetricsDictionary.cs
- OleDbConnectionFactory.cs
- InstalledVoice.cs
- EllipseGeometry.cs
- StringBuilder.cs
- HtmlInputRadioButton.cs
- SafeThreadHandle.cs
- Formatter.cs
- TabPage.cs
- BrowserDefinition.cs
- ExpressionPrinter.cs
- MethodCallConverter.cs
- NamedPipeTransportManager.cs
- XmlAnyAttributeAttribute.cs
- DataGridViewRowCollection.cs
- WebScriptServiceHostFactory.cs
- SrgsGrammar.cs
- PathStreamGeometryContext.cs
- Condition.cs
- ColorContextHelper.cs
- SafeArrayRankMismatchException.cs
- ContextMenuService.cs
- EntityDataSourceColumn.cs
- InternalConfigRoot.cs
- OleDbRowUpdatingEvent.cs
- DataGridViewComboBoxColumnDesigner.cs
- EventLogPermissionHolder.cs
- HashCodeCombiner.cs
- SkinIDTypeConverter.cs
- SecurityDescriptor.cs
- ConnectionString.cs
- WeakKeyDictionary.cs
- SystemEvents.cs
- TagPrefixAttribute.cs
- SchemaTypeEmitter.cs
- PersonalizationEntry.cs
- SoapCommonClasses.cs
- _NestedMultipleAsyncResult.cs
- CalloutQueueItem.cs
- DigestComparer.cs
- MenuItem.cs
- ContainerUIElement3D.cs
- SqlDependencyListener.cs
- ConditionalDesigner.cs
- XmlCharCheckingWriter.cs
- WebConfigurationManager.cs
- HandlerWithFactory.cs
- WinInetCache.cs
- RoutedEventValueSerializer.cs
- NetNamedPipeBindingElement.cs
- GradientStop.cs
- WebPartChrome.cs
- MultiPageTextView.cs
- DataBindingHandlerAttribute.cs
- CssStyleCollection.cs
- EventMappingSettings.cs
- DataGridViewColumnHeaderCell.cs
- BitmapCacheBrush.cs
- DockProviderWrapper.cs
- Automation.cs
- UndoManager.cs
- xamlnodes.cs
- ToggleProviderWrapper.cs
- LogEntryHeaderSerializer.cs
- RowCache.cs
- Vector3DAnimationUsingKeyFrames.cs
- ScriptingJsonSerializationSection.cs
- Baml2006KnownTypes.cs
- AddInSegmentDirectoryNotFoundException.cs
- KeyedHashAlgorithm.cs
- EntityContainer.cs
- RadialGradientBrush.cs
- LocalFileSettingsProvider.cs
- DescriptionAttribute.cs
- SubMenuStyleCollectionEditor.cs
- ToolStripDropDownButton.cs