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
- PageBreakRecord.cs
- ClientUtils.cs
- FloatAverageAggregationOperator.cs
- MailHeaderInfo.cs
- AuthenticationServiceManager.cs
- DataTableMappingCollection.cs
- XmlUnspecifiedAttribute.cs
- XmlReflectionMember.cs
- WorkflowOperationErrorHandler.cs
- PeerContact.cs
- MenuAutomationPeer.cs
- MobileFormsAuthentication.cs
- InnerItemCollectionView.cs
- backend.cs
- WindowsIdentity.cs
- BitConverter.cs
- ArgumentDesigner.xaml.cs
- CommandDesigner.cs
- JoinCqlBlock.cs
- HttpModulesSection.cs
- TagMapInfo.cs
- LZCodec.cs
- HttpRequestTraceRecord.cs
- CodeDomLoader.cs
- SvcMapFileSerializer.cs
- CodeIdentifier.cs
- AttachInfo.cs
- SqlBuffer.cs
- XPathSelectionIterator.cs
- TimeSpanParse.cs
- DataGridViewRowPrePaintEventArgs.cs
- DocumentViewerHelper.cs
- MarshalByRefObject.cs
- FunctionOverloadResolver.cs
- PageCodeDomTreeGenerator.cs
- SimpleApplicationHost.cs
- _AutoWebProxyScriptEngine.cs
- DynamicDocumentPaginator.cs
- JavaScriptString.cs
- VariableQuery.cs
- AnnotationComponentManager.cs
- DayRenderEvent.cs
- StrokeFIndices.cs
- OuterGlowBitmapEffect.cs
- ByteAnimationBase.cs
- ToolStripSplitButton.cs
- Renderer.cs
- ConfigurationManagerHelper.cs
- DBAsyncResult.cs
- FontStretch.cs
- EdmValidator.cs
- MapPathBasedVirtualPathProvider.cs
- AutomationProperties.cs
- PermissionSet.cs
- EncodingDataItem.cs
- RowUpdatedEventArgs.cs
- BindStream.cs
- DiscoveryOperationContextExtension.cs
- XmlWriterTraceListener.cs
- Accessors.cs
- IxmlLineInfo.cs
- ButtonChrome.cs
- LinqDataSourceDeleteEventArgs.cs
- ContextBase.cs
- TabControlAutomationPeer.cs
- PostBackOptions.cs
- EventInfo.cs
- ClientRolePrincipal.cs
- DataGridViewTopRowAccessibleObject.cs
- WindowsAuthenticationModule.cs
- KeyedHashAlgorithm.cs
- WhitespaceRule.cs
- KeyTime.cs
- ErasingStroke.cs
- ProxyWebPartConnectionCollection.cs
- CheckBoxField.cs
- UpdateRecord.cs
- EntityStoreSchemaFilterEntry.cs
- PageWrapper.cs
- LocalizableAttribute.cs
- NotSupportedException.cs
- TranslateTransform3D.cs
- XamlPoint3DCollectionSerializer.cs
- TypeGeneratedEventArgs.cs
- LayoutInformation.cs
- SourceFileInfo.cs
- Avt.cs
- ActivatableWorkflowsQueryResult.cs
- PerformanceCounterManager.cs
- EncodingDataItem.cs
- FlowDocumentFormatter.cs
- IndexedSelectQueryOperator.cs
- ClientData.cs
- FixUp.cs
- ScrollData.cs
- AttachedPropertyBrowsableAttribute.cs
- WebProxyScriptElement.cs
- DnsElement.cs
- SqlWebEventProvider.cs
- SQLChars.cs