Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- TransactionChannelFaultConverter.cs
- AtlasWeb.Designer.cs
- CompressStream.cs
- Matrix3DValueSerializer.cs
- ColorInterpolationModeValidation.cs
- _TimerThread.cs
- ExpressionList.cs
- ColorTranslator.cs
- ConfigurationValues.cs
- PersonalizationState.cs
- XmlElementList.cs
- OrCondition.cs
- IIS7WorkerRequest.cs
- EmptyEnumerable.cs
- ProfileService.cs
- SafeNativeMethodsOther.cs
- VectorAnimation.cs
- ObjectKeyFrameCollection.cs
- GetResponse.cs
- FixUp.cs
- IfJoinedCondition.cs
- EventRoute.cs
- Message.cs
- DataDocumentXPathNavigator.cs
- SpecularMaterial.cs
- DataListCommandEventArgs.cs
- SafeUserTokenHandle.cs
- BasicBrowserDialog.cs
- XsltContext.cs
- rsa.cs
- DataGridHeaderBorder.cs
- XmlSerializerVersionAttribute.cs
- ControlEvent.cs
- HostVisual.cs
- UpdateTranslator.cs
- TranslateTransform3D.cs
- Nullable.cs
- PolyLineSegment.cs
- SchemaNames.cs
- IndexedString.cs
- DbDeleteCommandTree.cs
- DataGridViewElement.cs
- TypeSystem.cs
- SafeNativeMethods.cs
- RemotingAttributes.cs
- ObjectRef.cs
- Floater.cs
- FontStyles.cs
- ToolStripItemDesigner.cs
- CategoryState.cs
- PerformanceCountersElement.cs
- Tablet.cs
- XmlSchemaSimpleType.cs
- XmlSerializationWriter.cs
- SoapHeaders.cs
- Track.cs
- MsmqMessageSerializationFormat.cs
- AccessorTable.cs
- Point3D.cs
- XmlConverter.cs
- QilUnary.cs
- VersionedStream.cs
- HijriCalendar.cs
- FilteredReadOnlyMetadataCollection.cs
- DbReferenceCollection.cs
- _TimerThread.cs
- TimeoutValidationAttribute.cs
- WindowsRichEditRange.cs
- DataGridViewBindingCompleteEventArgs.cs
- SQLGuid.cs
- TemplateColumn.cs
- SecureStringHasher.cs
- SelectionEditingBehavior.cs
- DummyDataSource.cs
- RemotingConfigParser.cs
- EdmProviderManifest.cs
- DataTableTypeConverter.cs
- CodeAttributeArgument.cs
- MergeLocalizationDirectives.cs
- DataServiceResponse.cs
- FtpWebRequest.cs
- PersonalizationProviderHelper.cs
- XmlSchemaObjectTable.cs
- DataServiceBehavior.cs
- FileEnumerator.cs
- FactorySettingsElement.cs
- GradientPanel.cs
- ObjectSet.cs
- MethodBuilderInstantiation.cs
- HttpServerVarsCollection.cs
- SqlDataSource.cs
- LightweightCodeGenerator.cs
- LayoutTableCell.cs
- DbDataSourceEnumerator.cs
- DataTransferEventArgs.cs
- WebPartChrome.cs
- InvalidCastException.cs
- CryptoHandle.cs
- RecordManager.cs
- DecodeHelper.cs