Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / ndp / fx / src / DataSet / System / Data / TypedTableBase.cs / 1 / TypedTableBase.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //spather //----------------------------------------------------------------------------- using System; using System.Collections.Generic; using System.Collections; using System.Linq; using System.Linq.Expressions; using System.Runtime.Serialization; namespace System.Data { ////// This is the generic base class for TypedDataSet /// [Serializable] public abstract class TypedTableBase: DataTable, IEnumerable where T : DataRow { /// /// Default constructor for generic TypedTableBase. /// Will be called by generated Typed DataSet classes and is not for public use. /// protected TypedTableBase() : base() {} ////// Constructor for the generic TypedTableBase with takes SerializationInfo and StreamingContext. /// Will be called by generated Typed DataSet classes and /// is not for public use. /// /// /// SerializationInfo containing data to construct the object. /// /// /// The streaming context for the object being deserializad. /// protected TypedTableBase(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) {} ////// This property returns a enumerator of T for the TypedTable. Note, this could /// execute the underlying Linq expression. /// ////// IEnumerable of T. /// public IEnumeratorGetEnumerator() { return this.Rows.Cast ().GetEnumerator(); } IEnumerator IEnumerable.GetEnumerator() { return GetEnumerator(); } /// /// Casts an EnumerableDataTable_TSource into EnumerableDataTable_TResult /// public EnumerableRowCollectionCast () { EnumerableRowCollection erc = new EnumerableRowCollection ((DataTable)this); return erc.Cast (); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ // // Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //spather //----------------------------------------------------------------------------- using System; using System.Collections.Generic; using System.Collections; using System.Linq; using System.Linq.Expressions; using System.Runtime.Serialization; namespace System.Data { ////// This is the generic base class for TypedDataSet /// [Serializable] public abstract class TypedTableBase: DataTable, IEnumerable where T : DataRow { /// /// Default constructor for generic TypedTableBase. /// Will be called by generated Typed DataSet classes and is not for public use. /// protected TypedTableBase() : base() {} ////// Constructor for the generic TypedTableBase with takes SerializationInfo and StreamingContext. /// Will be called by generated Typed DataSet classes and /// is not for public use. /// /// /// SerializationInfo containing data to construct the object. /// /// /// The streaming context for the object being deserializad. /// protected TypedTableBase(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) {} ////// This property returns a enumerator of T for the TypedTable. Note, this could /// execute the underlying Linq expression. /// ////// IEnumerable of T. /// public IEnumeratorGetEnumerator() { return this.Rows.Cast ().GetEnumerator(); } IEnumerator IEnumerable.GetEnumerator() { return GetEnumerator(); } /// /// Casts an EnumerableDataTable_TSource into EnumerableDataTable_TResult /// public EnumerableRowCollectionCast () { EnumerableRowCollection erc = new EnumerableRowCollection ((DataTable)this); return erc.Cast (); } } } // 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
- OledbConnectionStringbuilder.cs
- Base64Encoder.cs
- TraceHandler.cs
- XPathItem.cs
- FontUnitConverter.cs
- DataGridViewCellEventArgs.cs
- KeyValueConfigurationElement.cs
- ThreadAttributes.cs
- TreeNodeStyleCollection.cs
- SymmetricCryptoHandle.cs
- FileClassifier.cs
- ScrollItemProviderWrapper.cs
- CustomError.cs
- VirtualPath.cs
- ToolStripDropTargetManager.cs
- ObjectListTitleAttribute.cs
- TreeWalkHelper.cs
- ScriptingRoleServiceSection.cs
- BitArray.cs
- ControlBuilder.cs
- ToolStripContentPanelRenderEventArgs.cs
- Stackframe.cs
- coordinatorscratchpad.cs
- Win32Native.cs
- GenericRootAutomationPeer.cs
- SecurityMode.cs
- EventListener.cs
- HttpFileCollection.cs
- SerializableTypeCodeDomSerializer.cs
- VirtualPathUtility.cs
- StatusBarItem.cs
- ServerValidateEventArgs.cs
- ArraySubsetEnumerator.cs
- XmlNodeChangedEventManager.cs
- DescendantOverDescendantQuery.cs
- HttpApplicationFactory.cs
- Event.cs
- WebSysDisplayNameAttribute.cs
- xsdvalidator.cs
- QilBinary.cs
- XsdValidatingReader.cs
- RectangleGeometry.cs
- XmlDataProvider.cs
- Vertex.cs
- SqlOuterApplyReducer.cs
- ArrayListCollectionBase.cs
- SchemaInfo.cs
- compensatingcollection.cs
- DataGridViewCell.cs
- TableRow.cs
- UriTemplateLiteralPathSegment.cs
- ModuleBuilderData.cs
- PersonalizationProviderHelper.cs
- SystemDropShadowChrome.cs
- XmlSchemaSimpleContentRestriction.cs
- ValueProviderWrapper.cs
- StatusBarPanel.cs
- ExpressionPrefixAttribute.cs
- DLinqDataModelProvider.cs
- HttpListenerRequest.cs
- FontUnitConverter.cs
- QueryParameter.cs
- DataKey.cs
- TextRangeProviderWrapper.cs
- FormsAuthentication.cs
- EventNotify.cs
- StrongNameMembershipCondition.cs
- LinkedList.cs
- EqualityComparer.cs
- InputBindingCollection.cs
- SystemResources.cs
- xamlnodes.cs
- CommandBindingCollection.cs
- NativeRecognizer.cs
- AsyncCompletedEventArgs.cs
- ResourceProviderFactory.cs
- TemplateBindingExpression.cs
- Permission.cs
- CheckBoxRenderer.cs
- Model3DCollection.cs
- NativeMethods.cs
- PersonalizablePropertyEntry.cs
- LinkUtilities.cs
- ConfigurationErrorsException.cs
- PersonalizationStateInfo.cs
- UserControlCodeDomTreeGenerator.cs
- RequestBringIntoViewEventArgs.cs
- SingleKeyFrameCollection.cs
- ToolStripItemCollection.cs
- OdbcEnvironmentHandle.cs
- HuffmanTree.cs
- _ShellExpression.cs
- DefaultBinder.cs
- ListViewItem.cs
- StringResourceManager.cs
- TransformCryptoHandle.cs
- BooleanFunctions.cs
- ReliableMessagingVersion.cs
- XmlStreamStore.cs
- PartitionedDataSource.cs