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
- HttpWebResponse.cs
- Attributes.cs
- CommittableTransaction.cs
- DataSourceDesigner.cs
- WorkingDirectoryEditor.cs
- XmlByteStreamWriter.cs
- DataGridViewCellCancelEventArgs.cs
- base64Transforms.cs
- DecimalConverter.cs
- OleDbMetaDataFactory.cs
- Vector3DCollection.cs
- LinqExpressionNormalizer.cs
- WebServiceTypeData.cs
- WebServiceHandlerFactory.cs
- SafeFindHandle.cs
- NamespaceDecl.cs
- DrawingCollection.cs
- BinaryFormatter.cs
- xmlsaver.cs
- InputMethodStateTypeInfo.cs
- Operators.cs
- Line.cs
- Calendar.cs
- ValidatedControlConverter.cs
- ErrorWrapper.cs
- ObfuscateAssemblyAttribute.cs
- BrowserCapabilitiesFactory.cs
- EventItfInfo.cs
- SemanticValue.cs
- TimeSpanMinutesConverter.cs
- X509RecipientCertificateClientElement.cs
- XPathNodeList.cs
- objectresult_tresulttype.cs
- OutOfMemoryException.cs
- URIFormatException.cs
- TableLayoutStyle.cs
- ConstNode.cs
- ResourceWriter.cs
- CacheSection.cs
- RectangleGeometry.cs
- FlowLayoutSettings.cs
- SigningProgress.cs
- MenuAutomationPeer.cs
- SecurityDocument.cs
- ConfigXmlWhitespace.cs
- ReaderWriterLockWrapper.cs
- SignatureToken.cs
- ForeignKeyFactory.cs
- TypeInfo.cs
- OLEDB_Util.cs
- ReadOnlyHierarchicalDataSource.cs
- DocumentViewer.cs
- BinaryObjectInfo.cs
- AppDomainProtocolHandler.cs
- ComplexTypeEmitter.cs
- ISFClipboardData.cs
- WsatAdminException.cs
- DataGridViewCellPaintingEventArgs.cs
- DynamicMethod.cs
- OperationDescription.cs
- FontEmbeddingManager.cs
- CalendarDesigner.cs
- CompoundFileStorageReference.cs
- OutputCacheEntry.cs
- UInt32.cs
- TextWriter.cs
- GenericPrincipal.cs
- SafeFindHandle.cs
- Content.cs
- DataTable.cs
- _NegotiateClient.cs
- DesignerMetadata.cs
- SignedXmlDebugLog.cs
- Utility.cs
- XmlMtomReader.cs
- ObjectDataSourceDisposingEventArgs.cs
- BooleanExpr.cs
- AssociatedControlConverter.cs
- ObjectFullSpanRewriter.cs
- PropertyCollection.cs
- JsonQNameDataContract.cs
- SqlCaseSimplifier.cs
- DefaultBinder.cs
- CellLabel.cs
- TagMapInfo.cs
- TextShapeableCharacters.cs
- Point4DConverter.cs
- Errors.cs
- Internal.cs
- DesignConnectionCollection.cs
- FaultBookmark.cs
- DetailsView.cs
- SoapExtension.cs
- ConfigurationStrings.cs
- ReflectEventDescriptor.cs
- RotationValidation.cs
- WithParamAction.cs
- ContainerUtilities.cs
- ScriptResourceHandler.cs
- Subtree.cs