Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- DiscoveryDocumentSerializer.cs
- DataShape.cs
- NonVisualControlAttribute.cs
- _SecureChannel.cs
- VisualBrush.cs
- AmbientProperties.cs
- XappLauncher.cs
- XamlReader.cs
- ServiceNameElement.cs
- LockedHandleGlyph.cs
- dataobject.cs
- TextServicesContext.cs
- ElementInit.cs
- DataGridViewCellCollection.cs
- EncodingNLS.cs
- TimeSpanValidatorAttribute.cs
- OperatingSystem.cs
- WebHeaderCollection.cs
- querybuilder.cs
- AttachInfo.cs
- PerformanceCounter.cs
- DashStyle.cs
- FormView.cs
- GenericAuthenticationEventArgs.cs
- odbcmetadatacolumnnames.cs
- TakeOrSkipWhileQueryOperator.cs
- RequestCachePolicy.cs
- FontStyle.cs
- ValidationPropertyAttribute.cs
- BackStopAuthenticationModule.cs
- XmlAttributeCollection.cs
- wgx_render.cs
- FontInfo.cs
- ObjectItemCollectionAssemblyCacheEntry.cs
- PolicyStatement.cs
- AcceleratedTokenProviderState.cs
- JpegBitmapDecoder.cs
- GrabHandleGlyph.cs
- HttpServerUtilityWrapper.cs
- CustomCredentialPolicy.cs
- ContentType.cs
- WindowsSpinner.cs
- FileDialog_Vista_Interop.cs
- WorkflowRuntimeSection.cs
- URLIdentityPermission.cs
- QueryableFilterUserControl.cs
- ipaddressinformationcollection.cs
- FlowchartStart.xaml.cs
- Transform3D.cs
- Adorner.cs
- TextChangedEventArgs.cs
- TextPatternIdentifiers.cs
- CategoryNameCollection.cs
- TraceInternal.cs
- MetadataItemSerializer.cs
- SqlClientMetaDataCollectionNames.cs
- DocumentViewerBaseAutomationPeer.cs
- sqlinternaltransaction.cs
- EraserBehavior.cs
- ObjectViewFactory.cs
- RecordConverter.cs
- Bold.cs
- Point.cs
- ExpandSegment.cs
- precedingsibling.cs
- _NetRes.cs
- SqlDataSourceCache.cs
- AuthenticationSection.cs
- ContainerAction.cs
- MenuItem.cs
- AppSettingsExpressionEditor.cs
- MasterPageCodeDomTreeGenerator.cs
- MarkupCompilePass1.cs
- SqlRetyper.cs
- SafeCryptoHandles.cs
- ValueHandle.cs
- OdbcInfoMessageEvent.cs
- EntityDataSourceWrapperPropertyDescriptor.cs
- StylusLogic.cs
- RelatedView.cs
- ResolvedKeyFrameEntry.cs
- Debug.cs
- SigningDialog.cs
- DesignColumn.cs
- QueryConverter.cs
- ExtentJoinTreeNode.cs
- InputScope.cs
- IdentityReference.cs
- DataGridViewCellCollection.cs
- DbgCompiler.cs
- AssemblyFilter.cs
- ServiceReference.cs
- ApplicationId.cs
- ControlCollection.cs
- SQLBytes.cs
- RemoteWebConfigurationHostServer.cs
- XmlSerializerAssemblyAttribute.cs
- WebCategoryAttribute.cs
- codemethodreferenceexpression.cs
- CommandBindingCollection.cs