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
- DesignSurfaceEvent.cs
- FormViewInsertEventArgs.cs
- Control.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- WebPartsSection.cs
- BackgroundFormatInfo.cs
- _ConnectOverlappedAsyncResult.cs
- ThemeableAttribute.cs
- TransformationRules.cs
- webeventbuffer.cs
- DbQueryCommandTree.cs
- LongMinMaxAggregationOperator.cs
- JavaScriptSerializer.cs
- OleDbError.cs
- LogSwitch.cs
- Frame.cs
- dbdatarecord.cs
- DesignSurface.cs
- Internal.cs
- RoleGroup.cs
- XMLUtil.cs
- RuntimeWrappedException.cs
- BoundColumn.cs
- BinaryVersion.cs
- embossbitmapeffect.cs
- PageSettings.cs
- EdmError.cs
- ApplicationServiceManager.cs
- ReflectionHelper.cs
- RequestNavigateEventArgs.cs
- SqlWebEventProvider.cs
- ObjectItemAttributeAssemblyLoader.cs
- EdmMember.cs
- InputLanguageCollection.cs
- DirectoryInfo.cs
- InputLanguageEventArgs.cs
- SimpleType.cs
- WebPageTraceListener.cs
- PriorityChain.cs
- MarkupExtensionParser.cs
- SystemInformation.cs
- OleDbParameter.cs
- SvcMapFileSerializer.cs
- XmlSchemaObject.cs
- CurrentTimeZone.cs
- OleDbCommandBuilder.cs
- ClientSettings.cs
- DataGridViewComboBoxCell.cs
- PackagePart.cs
- DecodeHelper.cs
- FloatSumAggregationOperator.cs
- FilteredXmlReader.cs
- Thread.cs
- QuaternionRotation3D.cs
- AppDomainShutdownMonitor.cs
- Int32Animation.cs
- DrawingAttributes.cs
- Internal.cs
- ValueUnavailableException.cs
- WindowsTab.cs
- EmbeddedMailObject.cs
- OleDbParameterCollection.cs
- PackagePart.cs
- ExponentialEase.cs
- nulltextnavigator.cs
- HostedHttpContext.cs
- HandlerFactoryWrapper.cs
- DragDeltaEventArgs.cs
- ServiceMetadataExtension.cs
- ServiceHandle.cs
- IriParsingElement.cs
- ProfileSection.cs
- HtmlTernaryTree.cs
- COAUTHINFO.cs
- SynchronizedDispatch.cs
- ToolStripRenderer.cs
- DataGridViewRowsRemovedEventArgs.cs
- XmlCollation.cs
- OleDbDataAdapter.cs
- WebBrowser.cs
- TransactionChannelFaultConverter.cs
- HtmlToClrEventProxy.cs
- FixedFindEngine.cs
- TableLayoutCellPaintEventArgs.cs
- Matrix3DStack.cs
- PermissionAttributes.cs
- SmiMetaDataProperty.cs
- COM2ExtendedBrowsingHandler.cs
- Size.cs
- FieldBuilder.cs
- AnnotationAuthorChangedEventArgs.cs
- StylusCaptureWithinProperty.cs
- RoleManagerEventArgs.cs
- WebServiceData.cs
- ListBoxChrome.cs
- RemotingAttributes.cs
- FormsAuthenticationModule.cs
- InteropAutomationProvider.cs
- Label.cs
- LowerCaseStringConverter.cs