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
- AuthenticationException.cs
- QueryExpression.cs
- DecimalFormatter.cs
- IdentityHolder.cs
- DPAPIProtectedConfigurationProvider.cs
- BufferModesCollection.cs
- AppSettingsReader.cs
- JsonWriterDelegator.cs
- WindowClosedEventArgs.cs
- RegisteredHiddenField.cs
- OdbcParameterCollection.cs
- EventLogPermission.cs
- SafeFileHandle.cs
- ButtonDesigner.cs
- ConditionedDesigner.cs
- UndirectedGraph.cs
- DesignerSelectionListAdapter.cs
- AssociatedControlConverter.cs
- RelationalExpressions.cs
- ZoneLinkButton.cs
- Verify.cs
- TabletDeviceInfo.cs
- ServiceAuthorizationManager.cs
- LogSwitch.cs
- DetailsView.cs
- ApplicationGesture.cs
- EventLog.cs
- SamlAttribute.cs
- RetriableClipboard.cs
- NameValuePair.cs
- SpeechDetectedEventArgs.cs
- DataControlField.cs
- ObjectSpanRewriter.cs
- SimpleWebHandlerParser.cs
- TypeUtil.cs
- PublisherMembershipCondition.cs
- XPathLexer.cs
- TextElementCollectionHelper.cs
- InstanceDescriptor.cs
- LabelAutomationPeer.cs
- Grant.cs
- AppPool.cs
- ProfilePropertySettings.cs
- OutKeywords.cs
- CapabilitiesSection.cs
- smtppermission.cs
- LogicalCallContext.cs
- Validator.cs
- TemplateBindingExtensionConverter.cs
- DefaultHttpHandler.cs
- MatrixKeyFrameCollection.cs
- Cursors.cs
- SharedDp.cs
- HtmlTableRow.cs
- DaylightTime.cs
- GB18030Encoding.cs
- _ConnectOverlappedAsyncResult.cs
- BooleanConverter.cs
- Listbox.cs
- ListControlActionList.cs
- IChannel.cs
- BaseProcessProtocolHandler.cs
- SafeNativeHandle.cs
- BitmapEffectDrawing.cs
- Math.cs
- ImageDrawing.cs
- SqlNodeAnnotations.cs
- BrowserInteropHelper.cs
- RegexCode.cs
- PriorityRange.cs
- NavigationHelper.cs
- SourceFileBuildProvider.cs
- AdCreatedEventArgs.cs
- SessionStateUtil.cs
- StylusButtonEventArgs.cs
- XmlCDATASection.cs
- NetTcpSecurity.cs
- ipaddressinformationcollection.cs
- TableRowCollection.cs
- XamlReaderHelper.cs
- Rules.cs
- PkcsUtils.cs
- XmlStreamStore.cs
- ContainerVisual.cs
- RayHitTestParameters.cs
- CodeTypeMemberCollection.cs
- FrameworkElementAutomationPeer.cs
- WebServiceTypeData.cs
- CreateInstanceBinder.cs
- DuplicateWaitObjectException.cs
- ListSortDescription.cs
- ControlBuilderAttribute.cs
- ProxyManager.cs
- RepeatButtonAutomationPeer.cs
- TextBox.cs
- TagPrefixCollection.cs
- QueryUtil.cs
- DrawListViewItemEventArgs.cs
- WindowProviderWrapper.cs
- ISAPIRuntime.cs