Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / WebControls / XmlHierarchicalEnumerable.cs / 1305376 / 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
- ProviderSettingsCollection.cs
- MexTcpBindingCollectionElement.cs
- ImportCatalogPart.cs
- CodeAttributeDeclaration.cs
- WebScriptServiceHost.cs
- XmlDataImplementation.cs
- QueryReaderSettings.cs
- EventLogPermission.cs
- XPathDocumentIterator.cs
- DeploymentSection.cs
- PixelFormats.cs
- BypassElementCollection.cs
- ObjectTypeMapping.cs
- CaseStatementSlot.cs
- ObjectDataSourceWizardForm.cs
- propertyentry.cs
- XmlFormatExtensionAttribute.cs
- CodeMemberMethod.cs
- TextElementCollection.cs
- SafeRightsManagementQueryHandle.cs
- coordinator.cs
- InstancePersistenceEvent.cs
- TagPrefixAttribute.cs
- CalendarSelectionChangedEventArgs.cs
- KeyValueConfigurationCollection.cs
- ConnectionManagementElementCollection.cs
- WizardSideBarListControlItemEventArgs.cs
- MetabaseSettings.cs
- SmiEventSink_Default.cs
- FileVersion.cs
- UnsafeNativeMethods.cs
- UnsafeCollabNativeMethods.cs
- MenuEventArgs.cs
- OrderByLifter.cs
- GenericAuthenticationEventArgs.cs
- Rectangle.cs
- ArglessEventHandlerProxy.cs
- TakeQueryOptionExpression.cs
- TokenBasedSet.cs
- Rotation3DKeyFrameCollection.cs
- SHA256.cs
- SiteMapProvider.cs
- ObjectListFieldsPage.cs
- TextureBrush.cs
- EventMappingSettings.cs
- ISSmlParser.cs
- Int64Animation.cs
- JsonGlobals.cs
- SafeBitVector32.cs
- BindingMemberInfo.cs
- SrgsItemList.cs
- FormConverter.cs
- InertiaTranslationBehavior.cs
- ToolStripSettings.cs
- Form.cs
- Rect3DValueSerializer.cs
- initElementDictionary.cs
- TreeNodeStyle.cs
- DataControlFieldHeaderCell.cs
- DbParameterCollectionHelper.cs
- LayoutEditorPart.cs
- AutomationElement.cs
- CloseSequence.cs
- PolyQuadraticBezierSegment.cs
- CompareInfo.cs
- SecureEnvironment.cs
- SqlDataSourceEnumerator.cs
- DesignerDataTableBase.cs
- MenuItem.cs
- TypefaceCollection.cs
- FaultPropagationRecord.cs
- XmlSchemaSimpleContent.cs
- DataGridViewMethods.cs
- Vertex.cs
- AtomMaterializer.cs
- IgnorePropertiesAttribute.cs
- SelectionPattern.cs
- Utils.cs
- EmptyEnumerator.cs
- OnOperation.cs
- SingleTagSectionHandler.cs
- TreeNodeEventArgs.cs
- ApplicationServiceManager.cs
- GatewayDefinition.cs
- GradientSpreadMethodValidation.cs
- Point4D.cs
- Point4DConverter.cs
- DebugTrace.cs
- HwndSubclass.cs
- formatter.cs
- CipherData.cs
- Page.cs
- RegisteredHiddenField.cs
- PageClientProxyGenerator.cs
- RequestCachingSection.cs
- RemoteWebConfigurationHostStream.cs
- SynchronizationLockException.cs
- TogglePattern.cs
- RtfControls.cs
- MatrixCamera.cs