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
- Oid.cs
- ThrowHelper.cs
- DynamicValueConverter.cs
- DoubleAnimationBase.cs
- Point3DAnimation.cs
- SafeNativeMethodsOther.cs
- WindowsGraphicsCacheManager.cs
- PermissionListSet.cs
- ActionFrame.cs
- VirtualPathExtension.cs
- SynchronizedInputPattern.cs
- AssemblyAttributes.cs
- Msmq3PoisonHandler.cs
- SqlUdtInfo.cs
- TreeView.cs
- ToolStripLocationCancelEventArgs.cs
- DataProtection.cs
- NonPrimarySelectionGlyph.cs
- LinearGradientBrush.cs
- HtmlEmptyTagControlBuilder.cs
- EdmError.cs
- KeyMatchBuilder.cs
- NavigationFailedEventArgs.cs
- WebPartMenu.cs
- OdbcException.cs
- SystemIPInterfaceProperties.cs
- MinimizableAttributeTypeConverter.cs
- SchemaAttDef.cs
- ResXResourceSet.cs
- CodePrimitiveExpression.cs
- FontSizeConverter.cs
- TablePatternIdentifiers.cs
- Material.cs
- ExpressionWriter.cs
- RootDesignerSerializerAttribute.cs
- VisualCollection.cs
- XhtmlBasicCalendarAdapter.cs
- SHA1.cs
- AppDomainShutdownMonitor.cs
- CompilationRelaxations.cs
- Expander.cs
- DecimalAnimationBase.cs
- __TransparentProxy.cs
- DBSqlParserColumnCollection.cs
- DPCustomTypeDescriptor.cs
- NumberFunctions.cs
- MenuDesigner.cs
- LocalBuilder.cs
- ContextStack.cs
- RangeBase.cs
- GradientStopCollection.cs
- SchemaImporterExtensionElement.cs
- CodeSubDirectory.cs
- StrokeDescriptor.cs
- XmlSchemaFacet.cs
- HtmlControlPersistable.cs
- DataGridCell.cs
- SkewTransform.cs
- SafeRightsManagementHandle.cs
- XmlDocumentSurrogate.cs
- Point3D.cs
- SelectionListComponentEditor.cs
- ReadingWritingEntityEventArgs.cs
- ETagAttribute.cs
- ClosureBinding.cs
- SharedPersonalizationStateInfo.cs
- XmlSerializerObjectSerializer.cs
- TreeViewHitTestInfo.cs
- DispatcherTimer.cs
- SendReply.cs
- XmlNotation.cs
- ListViewGroup.cs
- Parser.cs
- SQLByteStorage.cs
- CharKeyFrameCollection.cs
- TextEditorTyping.cs
- DataTransferEventArgs.cs
- Inflater.cs
- AssemblySettingAttributes.cs
- JsonWriter.cs
- ServiceOperation.cs
- EntityDataSourceChangedEventArgs.cs
- PreservationFileWriter.cs
- MSAAEventDispatcher.cs
- RegexParser.cs
- DataPagerFieldCollection.cs
- SchemaNotation.cs
- ColumnResizeAdorner.cs
- EntityDesignerBuildProvider.cs
- QueryOutputWriter.cs
- FileAuthorizationModule.cs
- FrugalMap.cs
- VisualCollection.cs
- ProfileSection.cs
- EtwTrackingBehavior.cs
- XmlWhitespace.cs
- Effect.cs
- Drawing.cs
- HttpContextWrapper.cs
- ColorMatrix.cs