Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- TextModifier.cs
- WizardStepBase.cs
- LinearGradientBrush.cs
- BitHelper.cs
- SelectionGlyph.cs
- LineServicesCallbacks.cs
- WhiteSpaceTrimStringConverter.cs
- ToolStripRenderEventArgs.cs
- ElementNotAvailableException.cs
- WebServiceData.cs
- SoapIgnoreAttribute.cs
- VectorKeyFrameCollection.cs
- ContourSegment.cs
- FrameworkElementAutomationPeer.cs
- COM2Enum.cs
- EventMetadata.cs
- DetailsViewInsertedEventArgs.cs
- basenumberconverter.cs
- InputLanguageManager.cs
- OleDbReferenceCollection.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- SqlTypeSystemProvider.cs
- MSAAWinEventWrap.cs
- ListItemParagraph.cs
- EntityTypeEmitter.cs
- DecodeHelper.cs
- UriTemplateMatch.cs
- TreeNodeMouseHoverEvent.cs
- DesigntimeLicenseContext.cs
- TrackingServices.cs
- DrawingBrush.cs
- FlowPosition.cs
- TextRunProperties.cs
- PersistenceException.cs
- Pen.cs
- Calendar.cs
- WebServiceErrorEvent.cs
- IISUnsafeMethods.cs
- BorderGapMaskConverter.cs
- OptimizedTemplateContent.cs
- TypeDescriptionProvider.cs
- TraceEventCache.cs
- ToolStripPanelCell.cs
- ListViewInsertEventArgs.cs
- Resources.Designer.cs
- StrokeRenderer.cs
- XmlDictionaryReaderQuotasElement.cs
- VarRemapper.cs
- MeasurementDCInfo.cs
- Vars.cs
- HttpHeaderCollection.cs
- X509Certificate.cs
- WindowsGraphics.cs
- StringAttributeCollection.cs
- ListViewEditEventArgs.cs
- ValueSerializerAttribute.cs
- _LocalDataStoreMgr.cs
- LinearKeyFrames.cs
- HyperLinkField.cs
- BooleanConverter.cs
- CachedFontFace.cs
- ExpressionBuilderContext.cs
- InputBinding.cs
- PagedControl.cs
- ExceptionUtility.cs
- RichTextBox.cs
- DetailsViewModeEventArgs.cs
- BezierSegment.cs
- SchemaMapping.cs
- XmlBoundElement.cs
- MultiSelector.cs
- ImportRequest.cs
- IndicShape.cs
- Bits.cs
- RemoteWebConfigurationHostStream.cs
- GetImportFileNameRequest.cs
- RightsManagementEncryptedStream.cs
- ImageEditor.cs
- PassportAuthenticationModule.cs
- PhysicalFontFamily.cs
- OdbcConnectionOpen.cs
- HandlerBase.cs
- ScaleTransform.cs
- IsolatedStorageException.cs
- IOException.cs
- ConnectionsZone.cs
- WorkflowDurableInstance.cs
- DataServiceHostWrapper.cs
- TreeViewImageKeyConverter.cs
- PersonalizationProvider.cs
- ScriptManager.cs
- RegexCompiler.cs
- InvalidPrinterException.cs
- Base64Stream.cs
- HwndAppCommandInputProvider.cs
- BufferedReadStream.cs
- DynamicActionMessageFilter.cs
- WinFormsSecurity.cs
- LinearGradientBrush.cs
- Border.cs