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
- AutoResetEvent.cs
- InitializationEventAttribute.cs
- CodeNamespaceImport.cs
- _NegoState.cs
- RouteData.cs
- ConfigurationErrorsException.cs
- DocumentEventArgs.cs
- WorkflowViewManager.cs
- HtmlMeta.cs
- SectionInformation.cs
- NativeMethodsOther.cs
- parserscommon.cs
- UdpContractFilterBehavior.cs
- StreamGeometry.cs
- BaseCodeDomTreeGenerator.cs
- SerializationAttributes.cs
- SamlAuthorityBinding.cs
- ArgIterator.cs
- RangeBase.cs
- CodeTypeReferenceExpression.cs
- Visual3D.cs
- XmlRawWriter.cs
- RangeContentEnumerator.cs
- Attributes.cs
- DbConnectionStringBuilder.cs
- DriveNotFoundException.cs
- BaseInfoTable.cs
- HttpRequestCacheValidator.cs
- SqlConnectionHelper.cs
- Point4D.cs
- XmlNodeChangedEventManager.cs
- RecognizerInfo.cs
- AgileSafeNativeMemoryHandle.cs
- BooleanFacetDescriptionElement.cs
- ApplicationInfo.cs
- CompatibleComparer.cs
- ManagedFilter.cs
- MimeReflector.cs
- CryptoConfig.cs
- PartialCachingAttribute.cs
- FastEncoder.cs
- XmlUtil.cs
- DataGridViewButtonCell.cs
- SkinIDTypeConverter.cs
- JapaneseLunisolarCalendar.cs
- CodeArrayIndexerExpression.cs
- MetaModel.cs
- FieldBuilder.cs
- CodeGen.cs
- InvokeGenerator.cs
- FrameworkElementFactory.cs
- SchemaSetCompiler.cs
- QueryInterceptorAttribute.cs
- XMLSchema.cs
- CorrelationToken.cs
- ConfigsHelper.cs
- InstanceLockTracking.cs
- Compiler.cs
- CompositeFontParser.cs
- SafeNativeMethods.cs
- ChannelEndpointElementCollection.cs
- WebPartMinimizeVerb.cs
- CodeCommentStatementCollection.cs
- MatrixCamera.cs
- ConfigurationElement.cs
- WeakReferenceEnumerator.cs
- GeneralTransform3DTo2DTo3D.cs
- MenuItemStyleCollection.cs
- FilterEventArgs.cs
- ProxyWebPart.cs
- ErasingStroke.cs
- RequestTimeoutManager.cs
- DtrList.cs
- TextFormatterHost.cs
- RenderData.cs
- Tablet.cs
- ZipIOBlockManager.cs
- SQLBoolean.cs
- DateTimeUtil.cs
- FrameworkRichTextComposition.cs
- ColumnResizeUndoUnit.cs
- StructuralCache.cs
- HostVisual.cs
- ScrollItemProviderWrapper.cs
- SafeNativeMethodsMilCoreApi.cs
- GridViewDeletedEventArgs.cs
- WeakReadOnlyCollection.cs
- BaseParser.cs
- ProxyGenerator.cs
- CompensationHandlingFilter.cs
- ImpersonationOption.cs
- Exception.cs
- Grant.cs
- XmlCodeExporter.cs
- LabelEditEvent.cs
- SelectionRangeConverter.cs
- ColumnMapTranslator.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- EditorPartChrome.cs
- IndexedDataBuffer.cs