Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / DataSet / System / Data / TypedTableBase.cs / 1305376 / 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
- Message.cs
- xml.cs
- RemoteWebConfigurationHost.cs
- CookieHandler.cs
- SafeNativeMethodsMilCoreApi.cs
- ObfuscationAttribute.cs
- ProtocolsConfigurationEntry.cs
- AssemblyHash.cs
- ToolStripItemImageRenderEventArgs.cs
- BufferedGraphicsContext.cs
- HttpDictionary.cs
- HttpException.cs
- WebScriptMetadataFormatter.cs
- StringDictionaryCodeDomSerializer.cs
- LoginCancelEventArgs.cs
- ServicePointManager.cs
- Logging.cs
- ChameleonKey.cs
- ConfigXmlCDataSection.cs
- WinCategoryAttribute.cs
- DataGridSortCommandEventArgs.cs
- DetailsViewUpdatedEventArgs.cs
- InfiniteTimeSpanConverter.cs
- DateTimeConverter2.cs
- ListViewInsertedEventArgs.cs
- CoTaskMemHandle.cs
- WebPartEditorCancelVerb.cs
- Model3D.cs
- SchemaComplexType.cs
- XmlCustomFormatter.cs
- OperationSelectorBehavior.cs
- FormsAuthenticationUserCollection.cs
- SqlConnectionFactory.cs
- ApplicationSecurityInfo.cs
- CodeCompileUnit.cs
- EntitySet.cs
- GPRECT.cs
- OdbcErrorCollection.cs
- SafeHandles.cs
- TableLayoutRowStyleCollection.cs
- IDispatchConstantAttribute.cs
- AutoResetEvent.cs
- DataService.cs
- SymmetricAlgorithm.cs
- MasterPageParser.cs
- DataPagerField.cs
- TcpTransportManager.cs
- ButtonBase.cs
- Oid.cs
- XmlSerializationWriter.cs
- EnumerableRowCollectionExtensions.cs
- LinearGradientBrush.cs
- EntitySetBaseCollection.cs
- WriteStateInfoBase.cs
- PerformanceCounterManager.cs
- HtmlTextArea.cs
- Module.cs
- CellParagraph.cs
- Base64Decoder.cs
- TreeNodeClickEventArgs.cs
- DateTimeFormatInfoScanner.cs
- AnnotationResourceChangedEventArgs.cs
- documentsequencetextcontainer.cs
- WebPart.cs
- DocumentReference.cs
- SemanticResultValue.cs
- TcpTransportSecurity.cs
- CallContext.cs
- Geometry.cs
- WinHttpWebProxyFinder.cs
- FontWeight.cs
- ScriptResourceHandler.cs
- SynchronizedKeyedCollection.cs
- ScrollData.cs
- UxThemeWrapper.cs
- UnsafeNativeMethods.cs
- SqlDeflator.cs
- OutOfProcStateClientManager.cs
- nulltextcontainer.cs
- ParserContext.cs
- PoisonMessageException.cs
- ListSortDescriptionCollection.cs
- NavigatorOutput.cs
- MenuBase.cs
- TextProperties.cs
- MatrixTransform3D.cs
- Blend.cs
- XslTransformFileEditor.cs
- SByteStorage.cs
- CodeTypeMember.cs
- SiteMapNodeItemEventArgs.cs
- ClientApiGenerator.cs
- QilXmlReader.cs
- MDIClient.cs
- TextEditorCharacters.cs
- CompositeScriptReference.cs
- FaultDescriptionCollection.cs
- AssemblyName.cs
- SQLChars.cs
- ImageCodecInfo.cs