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
- PixelFormat.cs
- FamilyTypeface.cs
- PropertyGrid.cs
- Vars.cs
- MappableObjectManager.cs
- XmlEventCache.cs
- UxThemeWrapper.cs
- TextTrailingCharacterEllipsis.cs
- ReachObjectContext.cs
- DesignerLabelAdapter.cs
- UserControlBuildProvider.cs
- InstanceLockedException.cs
- StringFunctions.cs
- NavigationProgressEventArgs.cs
- ConfigurationLocationCollection.cs
- PasswordRecovery.cs
- ScriptModule.cs
- HwndAppCommandInputProvider.cs
- UnmanagedBitmapWrapper.cs
- LicFileLicenseProvider.cs
- Descriptor.cs
- PerformanceCounterCategory.cs
- UnsafeNativeMethods.cs
- DataGridViewCellStyleContentChangedEventArgs.cs
- ExtenderProvidedPropertyAttribute.cs
- MissingMemberException.cs
- SizeConverter.cs
- QilList.cs
- CommandTreeTypeHelper.cs
- ToolStripMenuItemCodeDomSerializer.cs
- SafePointer.cs
- Compress.cs
- UnmanagedMemoryStream.cs
- ColorMatrix.cs
- MeshGeometry3D.cs
- DataGridViewEditingControlShowingEventArgs.cs
- AuthenticatingEventArgs.cs
- EntityDataSourceWizardForm.cs
- FormViewPageEventArgs.cs
- DesignTimeValidationFeature.cs
- ChangePassword.cs
- TextWriterTraceListener.cs
- LineSegment.cs
- DataRowChangeEvent.cs
- _HelperAsyncResults.cs
- FamilyTypefaceCollection.cs
- CompilerErrorCollection.cs
- Pair.cs
- Int64AnimationBase.cs
- DataGridViewCellValueEventArgs.cs
- OlePropertyStructs.cs
- BindingCollection.cs
- AlphaSortedEnumConverter.cs
- RC2.cs
- RuleConditionDialog.cs
- ObjectListFieldCollection.cs
- PerformanceCounterNameAttribute.cs
- unitconverter.cs
- DataGridViewSelectedRowCollection.cs
- PageAsyncTask.cs
- diagnosticsswitches.cs
- RelatedImageListAttribute.cs
- CollectionChange.cs
- SQLInt64Storage.cs
- UnaryExpression.cs
- DispatcherTimer.cs
- XmlILTrace.cs
- DataControlFieldCell.cs
- SvcMapFile.cs
- NamedObject.cs
- CharEnumerator.cs
- DecimalConverter.cs
- SqlDataSourceCache.cs
- ScriptRegistrationManager.cs
- GridViewAutoFormat.cs
- ItemContainerPattern.cs
- ConfigurationValues.cs
- StylusTouchDevice.cs
- GifBitmapDecoder.cs
- DocumentAutomationPeer.cs
- HttpCacheVary.cs
- SchemaImporterExtensionsSection.cs
- DesignerRegionCollection.cs
- AncillaryOps.cs
- SqlCacheDependencyDatabaseCollection.cs
- xmlglyphRunInfo.cs
- EventLogger.cs
- GridViewDeletedEventArgs.cs
- InputMethodStateChangeEventArgs.cs
- NativeMethods.cs
- ObjRef.cs
- Run.cs
- DbDataAdapter.cs
- WebServiceEnumData.cs
- ImageListStreamer.cs
- StandardBindingElement.cs
- IdentityModelDictionary.cs
- Brushes.cs
- WebPartTransformer.cs
- ProtocolsConfigurationHandler.cs