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
- Transform.cs
- IDReferencePropertyAttribute.cs
- XmlCompatibilityReader.cs
- ProgressBarRenderer.cs
- RawStylusInputCustomDataList.cs
- TimeSpanParse.cs
- FontFamily.cs
- SafeArrayTypeMismatchException.cs
- CompilerCollection.cs
- SelectionWordBreaker.cs
- RIPEMD160.cs
- ConstraintEnumerator.cs
- DescriptionAttribute.cs
- DotExpr.cs
- SectionRecord.cs
- ZipIOCentralDirectoryBlock.cs
- EncryptedKey.cs
- ContainerControlDesigner.cs
- XpsImage.cs
- FontStretchConverter.cs
- MachineKeySection.cs
- EventToken.cs
- ParserHooks.cs
- ChangeNode.cs
- ISAPIRuntime.cs
- WebPartMenu.cs
- WebPartsSection.cs
- BinaryReader.cs
- ISFClipboardData.cs
- InheritablePropertyChangeInfo.cs
- ProviderBase.cs
- SourceFileBuildProvider.cs
- XmlNullResolver.cs
- BitmapPalette.cs
- InternalCompensate.cs
- DesignerImageAdapter.cs
- AnnotationMap.cs
- SessionStateSection.cs
- ToolboxComponentsCreatedEventArgs.cs
- sqlinternaltransaction.cs
- FixedSOMFixedBlock.cs
- SchemaObjectWriter.cs
- ToolboxBitmapAttribute.cs
- HttpDebugHandler.cs
- AsymmetricSignatureDeformatter.cs
- Viewport3DAutomationPeer.cs
- ObjectResult.cs
- CodeTypeDeclarationCollection.cs
- TextTreeObjectNode.cs
- SqlServer2KCompatibilityAnnotation.cs
- GeneralTransform2DTo3DTo2D.cs
- SoapReflectionImporter.cs
- TypedTableBase.cs
- Transform.cs
- VectorConverter.cs
- HandlerWithFactory.cs
- AlignmentXValidation.cs
- BypassElement.cs
- Parser.cs
- ConfigurationStrings.cs
- FormatterConverter.cs
- SHA1Managed.cs
- HMACSHA1.cs
- DefaultEvaluationContext.cs
- PropertyValueChangedEvent.cs
- WindowsTokenRoleProvider.cs
- InertiaExpansionBehavior.cs
- TextEndOfLine.cs
- StoreItemCollection.cs
- ControlIdConverter.cs
- DataGridViewColumnCollection.cs
- TableLayout.cs
- Vector3DAnimation.cs
- DbMetaDataFactory.cs
- XmlSchemaSimpleTypeUnion.cs
- AccessibilityHelperForVista.cs
- ContentType.cs
- EntityContainerAssociationSet.cs
- NativeMethods.cs
- ReferencedAssembly.cs
- ScrollItemPattern.cs
- ObjectPersistData.cs
- SystemWebSectionGroup.cs
- ScopedMessagePartSpecification.cs
- WindowShowOrOpenTracker.cs
- TimeSpanOrInfiniteValidator.cs
- ConfigurationSchemaErrors.cs
- DataGridViewAdvancedBorderStyle.cs
- TreeViewItem.cs
- SecurityCriticalDataForSet.cs
- Scripts.cs
- ContentWrapperAttribute.cs
- VirtualPathUtility.cs
- __Error.cs
- ContentElement.cs
- BooleanConverter.cs
- _NegoStream.cs
- ArrayElementGridEntry.cs
- CngAlgorithmGroup.cs
- BuildResultCache.cs