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
- DataServiceRequest.cs
- CodeTypeReferenceCollection.cs
- CachedTypeface.cs
- Variable.cs
- oledbmetadatacolumnnames.cs
- InternalTypeHelper.cs
- DataGridViewHitTestInfo.cs
- FlowLayoutPanel.cs
- _SslState.cs
- RowUpdatingEventArgs.cs
- ContainerSelectorActiveEvent.cs
- WebPermission.cs
- ReversePositionQuery.cs
- IndicShape.cs
- EntityCommandCompilationException.cs
- SelectionItemPattern.cs
- CacheHelper.cs
- DependencyObjectPropertyDescriptor.cs
- AppSettingsExpressionBuilder.cs
- Receive.cs
- LayeredChannelFactory.cs
- FontStretches.cs
- XmlElementList.cs
- LogicalTreeHelper.cs
- EventNotify.cs
- ExceptionRoutedEventArgs.cs
- TreeNodeCollection.cs
- ValuePatternIdentifiers.cs
- KeyConverter.cs
- ellipse.cs
- initElementDictionary.cs
- DelegatingConfigHost.cs
- RIPEMD160Managed.cs
- Metadata.cs
- SHA512.cs
- DataKey.cs
- CannotUnloadAppDomainException.cs
- WindowsRichEditRange.cs
- DbParameterCollectionHelper.cs
- SHA384.cs
- SortedDictionary.cs
- ConnectionProviderAttribute.cs
- MessageBodyDescription.cs
- ExpressionEditor.cs
- TableItemPattern.cs
- TextBoxAutomationPeer.cs
- AuthenticationConfig.cs
- HtmlInputReset.cs
- ExpressionBuilderContext.cs
- MembershipAdapter.cs
- QualifierSet.cs
- SQLInt64.cs
- _TimerThread.cs
- LinkDescriptor.cs
- HandleCollector.cs
- OAVariantLib.cs
- DrawToolTipEventArgs.cs
- ProfileSettingsCollection.cs
- ForwardPositionQuery.cs
- ObjectFullSpanRewriter.cs
- XPathDocumentBuilder.cs
- WebPartConnectionCollection.cs
- HtmlInputFile.cs
- TraceData.cs
- FontStretchConverter.cs
- StylusDownEventArgs.cs
- PrimitiveOperationFormatter.cs
- RelationshipDetailsRow.cs
- IndicCharClassifier.cs
- SettingsPropertyWrongTypeException.cs
- SessionPageStateSection.cs
- LayoutEditorPart.cs
- ResolveNameEventArgs.cs
- Zone.cs
- NominalTypeEliminator.cs
- ScriptMethodAttribute.cs
- ProfilePropertySettings.cs
- mda.cs
- StylusDownEventArgs.cs
- DataTableNewRowEvent.cs
- ChainOfDependencies.cs
- cryptoapiTransform.cs
- CodeMemberEvent.cs
- FloatUtil.cs
- AutoCompleteStringCollection.cs
- DataTableMapping.cs
- UIPropertyMetadata.cs
- BitmapEffectDrawingContextState.cs
- BaseCodeDomTreeGenerator.cs
- LogLogRecordHeader.cs
- TimeStampChecker.cs
- XmlSerializationReader.cs
- TraceFilter.cs
- SqlClientWrapperSmiStream.cs
- Persist.cs
- InstanceDescriptor.cs
- InputBuffer.cs
- CompositeControl.cs
- UpdateTracker.cs
- ThreadStateException.cs