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
- DataGridCell.cs
- Propagator.JoinPropagator.JoinPredicateVisitor.cs
- LinqDataSourceContextData.cs
- EntityDataSourceDataSelection.cs
- NavigateEvent.cs
- MailWebEventProvider.cs
- BaseTemplateCodeDomTreeGenerator.cs
- ToolStripEditorManager.cs
- SafeNativeMemoryHandle.cs
- PackageRelationshipCollection.cs
- MailBnfHelper.cs
- DataGridToolTip.cs
- XmlSchemaDocumentation.cs
- WsdlBuildProvider.cs
- HttpInputStream.cs
- IgnoreDataMemberAttribute.cs
- XamlParser.cs
- SQLCharsStorage.cs
- Pkcs7Signer.cs
- InvalidPrinterException.cs
- XmlSchemaAnyAttribute.cs
- XNameTypeConverter.cs
- CreatingCookieEventArgs.cs
- SafeArchiveContext.cs
- BoundingRectTracker.cs
- StoreAnnotationsMap.cs
- InArgument.cs
- MaskedTextProvider.cs
- BufferedGraphicsContext.cs
- Documentation.cs
- BooleanExpr.cs
- TypeConverterAttribute.cs
- GeneralTransform3DCollection.cs
- ItemMap.cs
- SelectionPatternIdentifiers.cs
- TimeManager.cs
- ParserStreamGeometryContext.cs
- BuildProvidersCompiler.cs
- HtmlString.cs
- StringCollection.cs
- CorrelationScope.cs
- QilParameter.cs
- Path.cs
- MarkedHighlightComponent.cs
- OleDbDataAdapter.cs
- JsonEnumDataContract.cs
- ControlUtil.cs
- Publisher.cs
- ItemAutomationPeer.cs
- RegionIterator.cs
- Events.cs
- PseudoWebRequest.cs
- _LocalDataStore.cs
- XamlSerializerUtil.cs
- WorkflowRuntimeServiceElement.cs
- DbProviderSpecificTypePropertyAttribute.cs
- ScriptServiceAttribute.cs
- BridgeDataRecord.cs
- XmlArrayItemAttributes.cs
- PeerCollaborationPermission.cs
- ManifestBasedResourceGroveler.cs
- DoubleLinkList.cs
- AnimationLayer.cs
- ProgressChangedEventArgs.cs
- DictionaryBase.cs
- Win32Interop.cs
- DataGridViewRowContextMenuStripNeededEventArgs.cs
- StateFinalizationActivity.cs
- IProducerConsumerCollection.cs
- NamespaceQuery.cs
- LassoHelper.cs
- Mapping.cs
- MissingMethodException.cs
- TextFormatterContext.cs
- KerberosSecurityTokenAuthenticator.cs
- WebResourceAttribute.cs
- LinkConverter.cs
- odbcmetadatafactory.cs
- CompositeActivityMarkupSerializer.cs
- TableRow.cs
- ServicePointManager.cs
- SQLMoneyStorage.cs
- MethodRental.cs
- BrushValueSerializer.cs
- WeakEventTable.cs
- ElementsClipboardData.cs
- X509SecurityTokenAuthenticator.cs
- WebRequestModuleElementCollection.cs
- InternalBase.cs
- CollectionEditVerbManager.cs
- RadioButtonDesigner.cs
- ReferencedCollectionType.cs
- MessagePropertyFilter.cs
- CompiledXpathExpr.cs
- AnimationTimeline.cs
- WorkflowMarkupSerializerMapping.cs
- EntitySqlQueryCacheEntry.cs
- ReflectionHelper.cs
- StorageComplexPropertyMapping.cs
- SelectionPatternIdentifiers.cs