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
- FileLoadException.cs
- TableLayout.cs
- OleDbError.cs
- SoapFault.cs
- TreeNodeBindingCollection.cs
- TableRow.cs
- TraceLog.cs
- MissingManifestResourceException.cs
- RijndaelManaged.cs
- CancelEventArgs.cs
- IPAddressCollection.cs
- ButtonChrome.cs
- AnnotationService.cs
- MultiView.cs
- MatrixKeyFrameCollection.cs
- COM2ExtendedBrowsingHandler.cs
- COM2PropertyBuilderUITypeEditor.cs
- ForeignKeyFactory.cs
- CustomUserNameSecurityTokenAuthenticator.cs
- DefaultAsyncDataDispatcher.cs
- RelativeSource.cs
- WebDescriptionAttribute.cs
- Int16.cs
- LabelTarget.cs
- TaskForm.cs
- IISMapPath.cs
- AspCompat.cs
- DiscriminatorMap.cs
- GetPageCompletedEventArgs.cs
- PkcsMisc.cs
- Win32KeyboardDevice.cs
- isolationinterop.cs
- ResourceReferenceExpression.cs
- CompilationUnit.cs
- ZoomingMessageFilter.cs
- ArrayEditor.cs
- DataGridRowHeaderAutomationPeer.cs
- ValidatedControlConverter.cs
- OutOfProcStateClientManager.cs
- Codec.cs
- InvalidDataException.cs
- BrushMappingModeValidation.cs
- SoapAttributes.cs
- Compiler.cs
- EntityType.cs
- TextEndOfParagraph.cs
- IpcServerChannel.cs
- HelpProvider.cs
- LinkLabelLinkClickedEvent.cs
- SqlBooleanizer.cs
- exports.cs
- ObjectReaderCompiler.cs
- TransformerInfoCollection.cs
- TTSEngineProxy.cs
- EdgeModeValidation.cs
- HttpWebResponse.cs
- ScrollProperties.cs
- xmlNames.cs
- BufferCache.cs
- EmptyStringExpandableObjectConverter.cs
- TableAdapterManagerGenerator.cs
- InstanceKeyView.cs
- StaticTextPointer.cs
- ImageButton.cs
- StylusDownEventArgs.cs
- NamespaceCollection.cs
- JsonDeserializer.cs
- WmpBitmapEncoder.cs
- DataBoundControlHelper.cs
- AutoResetEvent.cs
- DataColumnSelectionConverter.cs
- ObjectViewQueryResultData.cs
- ActivityCodeDomSerializationManager.cs
- EntityDataSourceReferenceGroup.cs
- FileDialogCustomPlaces.cs
- _CommandStream.cs
- GcSettings.cs
- TemporaryBitmapFile.cs
- VisualStateGroup.cs
- NavigationProperty.cs
- MachineKeyConverter.cs
- WrappedIUnknown.cs
- BitmapCodecInfoInternal.cs
- EventData.cs
- HMACSHA1.cs
- BitHelper.cs
- Attributes.cs
- CheckBoxList.cs
- BrowserCapabilitiesCompiler.cs
- BinaryObjectInfo.cs
- ExpandSegment.cs
- MinMaxParagraphWidth.cs
- FontSource.cs
- GenericXmlSecurityTokenAuthenticator.cs
- HierarchicalDataSourceControl.cs
- TakeOrSkipQueryOperator.cs
- TypeSource.cs
- RecordBuilder.cs
- GenerateScriptTypeAttribute.cs
- GridLengthConverter.cs