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
- XmlEncoding.cs
- HitTestFilterBehavior.cs
- FormattedTextSymbols.cs
- WebPartEventArgs.cs
- ArrayWithOffset.cs
- __Filters.cs
- SqlBulkCopy.cs
- AdditionalEntityFunctions.cs
- Cursors.cs
- AssemblyName.cs
- MediaContext.cs
- RunWorkerCompletedEventArgs.cs
- KeyEventArgs.cs
- _HelperAsyncResults.cs
- XmlEntity.cs
- ButtonFlatAdapter.cs
- SqlDataSourceQueryEditorForm.cs
- GroupedContextMenuStrip.cs
- SimpleRecyclingCache.cs
- UpdatePanelTrigger.cs
- filewebresponse.cs
- LabelEditEvent.cs
- Models.cs
- PanningMessageFilter.cs
- VirtualizingPanel.cs
- ZipIOExtraField.cs
- FixedNode.cs
- PathSegmentCollection.cs
- OpCopier.cs
- PackWebResponse.cs
- CuspData.cs
- ResourceDescriptionAttribute.cs
- DefaultPrintController.cs
- Int32Animation.cs
- CardSpaceShim.cs
- SplineKeyFrames.cs
- XamlNamespaceHelper.cs
- UseLicense.cs
- MimeMapping.cs
- FilterableAttribute.cs
- WsdlInspector.cs
- DebuggerService.cs
- FrugalMap.cs
- SplitterEvent.cs
- AliasedSlot.cs
- SecurityTokenSerializer.cs
- CultureData.cs
- TextAction.cs
- TableMethodGenerator.cs
- LicenseException.cs
- TemplateBuilder.cs
- AccessedThroughPropertyAttribute.cs
- UnorderedHashRepartitionStream.cs
- Encoder.cs
- DtdParser.cs
- Socket.cs
- TraceUtility.cs
- BitmapImage.cs
- DesignBinding.cs
- GeometryModel3D.cs
- Int32CAMarshaler.cs
- MailFileEditor.cs
- HostSecurityManager.cs
- Transform3DGroup.cs
- UnsafeNativeMethods.cs
- PasswordPropertyTextAttribute.cs
- documentsequencetextpointer.cs
- CommandField.cs
- TempFiles.cs
- TaiwanLunisolarCalendar.cs
- SQLGuidStorage.cs
- DefaultValueAttribute.cs
- BamlBinaryReader.cs
- DescendantBaseQuery.cs
- X509Utils.cs
- ThicknessKeyFrameCollection.cs
- CurrentChangedEventManager.cs
- BinaryNode.cs
- NoResizeSelectionBorderGlyph.cs
- MenuItemAutomationPeer.cs
- FontCacheUtil.cs
- BinaryEditor.cs
- AsymmetricKeyExchangeDeformatter.cs
- DataGridViewLayoutData.cs
- TabletCollection.cs
- SoapSchemaExporter.cs
- EndpointFilterProvider.cs
- DragCompletedEventArgs.cs
- CellCreator.cs
- UndirectedGraph.cs
- ContentPlaceHolder.cs
- CmsInterop.cs
- HtmlButton.cs
- WebHttpSecurity.cs
- FacetChecker.cs
- COAUTHINFO.cs
- EntityDataSourceSelectedEventArgs.cs
- ClientSideProviderDescription.cs
- InitialServerConnectionReader.cs
- ValuePattern.cs