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
- Menu.cs
- FieldDescriptor.cs
- OuterGlowBitmapEffect.cs
- ForwardPositionQuery.cs
- CroppedBitmap.cs
- PointConverter.cs
- CategoryNameCollection.cs
- XmlElementAttribute.cs
- EnlistmentState.cs
- ThaiBuddhistCalendar.cs
- ImportedNamespaceContextItem.cs
- SelectionEditingBehavior.cs
- DBSqlParserTable.cs
- XmlSchemaRedefine.cs
- MemberHolder.cs
- InvalidFilterCriteriaException.cs
- GenericWebPart.cs
- CodeCompileUnit.cs
- AttachedPropertyInfo.cs
- _FtpDataStream.cs
- ObjectQueryExecutionPlan.cs
- LabelEditEvent.cs
- Knowncolors.cs
- TraceInternal.cs
- PolyLineSegment.cs
- InvalidMessageContractException.cs
- ToolStripPanelRow.cs
- TextDataBindingHandler.cs
- HotSpotCollection.cs
- coordinator.cs
- SerializationStore.cs
- SecurityPolicySection.cs
- DataControlFieldsEditor.cs
- HttpSessionStateWrapper.cs
- RequestQueryParser.cs
- HWStack.cs
- OdbcParameterCollection.cs
- AbstractSvcMapFileLoader.cs
- TextElementEditingBehaviorAttribute.cs
- MsmqBindingElementBase.cs
- CodeCommentStatement.cs
- TraceData.cs
- ResXBuildProvider.cs
- FormattedText.cs
- Animatable.cs
- LinqDataSourceValidationException.cs
- HtmlTernaryTree.cs
- BuildProvider.cs
- AbstractDataSvcMapFileLoader.cs
- ThrowHelper.cs
- XmlSchemaElement.cs
- Helpers.cs
- SocketAddress.cs
- BitmapMetadataEnumerator.cs
- DataColumnChangeEvent.cs
- CircleHotSpot.cs
- DependsOnAttribute.cs
- HandleValueEditor.cs
- EventLogTraceListener.cs
- EntityContainerEmitter.cs
- RSACryptoServiceProvider.cs
- TextClipboardData.cs
- FormatSettings.cs
- X509Extension.cs
- SystemColors.cs
- Brush.cs
- ILGenerator.cs
- IdentityReference.cs
- RequestQueue.cs
- ProviderConnectionPoint.cs
- XmlSecureResolver.cs
- SystemFonts.cs
- MatchSingleFxEngineOpcode.cs
- DecoderFallbackWithFailureFlag.cs
- MissingManifestResourceException.cs
- PointLightBase.cs
- FormParameter.cs
- Region.cs
- ForeignKeyConstraint.cs
- HttpApplication.cs
- BooleanAnimationUsingKeyFrames.cs
- Graphics.cs
- AsmxEndpointPickerExtension.cs
- CalendarTable.cs
- EncoderParameters.cs
- Aggregates.cs
- ToolboxComponentsCreatingEventArgs.cs
- ControlBindingsCollection.cs
- Attributes.cs
- Themes.cs
- DefaultMergeHelper.cs
- HandlerWithFactory.cs
- Effect.cs
- SamlAction.cs
- LabelExpression.cs
- ToolConsole.cs
- WebPartConnectionsConfigureVerb.cs
- DllHostedComPlusServiceHost.cs
- IndentedWriter.cs
- RegularExpressionValidator.cs