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
- UIElementParagraph.cs
- TextRangeEditLists.cs
- ObjectParameter.cs
- AutomationPattern.cs
- WindowsMenu.cs
- altserialization.cs
- XhtmlTextWriter.cs
- SqlCachedBuffer.cs
- InvokeBase.cs
- MouseGesture.cs
- StyleXamlParser.cs
- Bits.cs
- TreeViewImageKeyConverter.cs
- CompositeScriptReference.cs
- DataControlFieldHeaderCell.cs
- ProcessModelInfo.cs
- DynamicResourceExtension.cs
- VariableReference.cs
- AttributeCollection.cs
- ProfilePropertyNameValidator.cs
- StrokeRenderer.cs
- WindowClosedEventArgs.cs
- SHA256Managed.cs
- DataTableReader.cs
- Fonts.cs
- MulticastDelegate.cs
- StyleXamlParser.cs
- ExtensionQuery.cs
- SurrogateEncoder.cs
- Button.cs
- LayoutManager.cs
- KeyedCollection.cs
- ErrorWebPart.cs
- ProxyHelper.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- WebPartManagerInternals.cs
- AvTraceFormat.cs
- SqlServer2KCompatibilityAnnotation.cs
- DataAdapter.cs
- CompiledRegexRunner.cs
- FileDialogPermission.cs
- ISFClipboardData.cs
- ScrollChrome.cs
- Stylesheet.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- InitialServerConnectionReader.cs
- KeyConstraint.cs
- ArrayWithOffset.cs
- FormatterConverter.cs
- PolyQuadraticBezierSegment.cs
- PersonalizationStateInfoCollection.cs
- ReadOnlyDictionary.cs
- xamlnodes.cs
- SqlDataSource.cs
- Pool.cs
- SmtpClient.cs
- ParseElementCollection.cs
- CustomDictionarySources.cs
- ThreadSafeMessageFilterTable.cs
- ApplicationDirectory.cs
- ComponentChangedEvent.cs
- TracingConnectionListener.cs
- DispatchRuntime.cs
- ArithmeticException.cs
- sqlstateclientmanager.cs
- PageAsyncTaskManager.cs
- Environment.cs
- TableRowCollection.cs
- WpfGeneratedKnownProperties.cs
- MimeXmlReflector.cs
- BitmapEffectDrawing.cs
- DataListItem.cs
- SpeechEvent.cs
- Annotation.cs
- DecimalAnimationUsingKeyFrames.cs
- XmlILIndex.cs
- RelationalExpressions.cs
- TextEditorContextMenu.cs
- LineServices.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- ComNativeDescriptor.cs
- DataControlField.cs
- StatusInfoItem.cs
- HwndMouseInputProvider.cs
- NamedPipeActivation.cs
- SafeArchiveContext.cs
- RegistrationServices.cs
- StartUpEventArgs.cs
- OrderByBuilder.cs
- LayoutTableCell.cs
- PrintEvent.cs
- MouseEvent.cs
- EnumerableWrapperWeakToStrong.cs
- InputChannelAcceptor.cs
- CriticalExceptions.cs
- EventSinkActivity.cs
- PrivateUnsafeNativeCompoundFileMethods.cs
- DataGridHeadersVisibilityToVisibilityConverter.cs
- XpsViewerException.cs
- SpeechSeg.cs