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
- ResolveMatchesCD1.cs
- ProfilePropertyMetadata.cs
- HttpPostProtocolImporter.cs
- CLSCompliantAttribute.cs
- BinaryFormatter.cs
- Visual3DCollection.cs
- DesignerEditorPartChrome.cs
- RawUIStateInputReport.cs
- Token.cs
- iisPickupDirectory.cs
- FileDialog.cs
- WebEvents.cs
- XmlSchemaSimpleTypeRestriction.cs
- ForeignConstraint.cs
- COMException.cs
- TypeUnloadedException.cs
- Matrix.cs
- FillBehavior.cs
- SmiMetaData.cs
- TextTreeTextNode.cs
- FloatUtil.cs
- PhysicalOps.cs
- SharedPersonalizationStateInfo.cs
- KoreanLunisolarCalendar.cs
- PropertyRecord.cs
- SignerInfo.cs
- Camera.cs
- DataGridState.cs
- RunClient.cs
- FixedPosition.cs
- CancelEventArgs.cs
- InternalConfigRoot.cs
- Message.cs
- CopyEncoder.cs
- IdentityModelDictionary.cs
- SqlInternalConnectionTds.cs
- EdmMember.cs
- MatchingStyle.cs
- VectorConverter.cs
- PackWebResponse.cs
- DragDropManager.cs
- COAUTHIDENTITY.cs
- TypedRowGenerator.cs
- WmlLinkAdapter.cs
- TextOutput.cs
- ProcessModuleCollection.cs
- DataFormats.cs
- TdsValueSetter.cs
- XXXInfos.cs
- UrlPath.cs
- ControlPersister.cs
- PathSegmentCollection.cs
- SerializationUtility.cs
- DataColumn.cs
- StoreItemCollection.Loader.cs
- WsiProfilesElementCollection.cs
- RadioButtonRenderer.cs
- EntitySetBaseCollection.cs
- StylusPoint.cs
- TypedDatasetGenerator.cs
- UpdateException.cs
- ISO2022Encoding.cs
- MouseWheelEventArgs.cs
- TextParagraphCache.cs
- Queue.cs
- ComponentDispatcher.cs
- DbExpressionRules.cs
- BufferedStream.cs
- List.cs
- XmlText.cs
- SeparatorAutomationPeer.cs
- DataGridTextBox.cs
- Int16Storage.cs
- DependencyObjectCodeDomSerializer.cs
- XmlSiteMapProvider.cs
- WorkflowOwnershipException.cs
- XmlNamespaceManager.cs
- XPathDescendantIterator.cs
- TraceLog.cs
- TableRow.cs
- DecimalKeyFrameCollection.cs
- APCustomTypeDescriptor.cs
- ParserOptions.cs
- DynamicActionMessageFilter.cs
- XmlToDatasetMap.cs
- FileLogRecord.cs
- IISUnsafeMethods.cs
- CompiledQuery.cs
- QuerySetOp.cs
- CompiledQuery.cs
- TemplateModeChangedEventArgs.cs
- RoutingConfiguration.cs
- _IPv6Address.cs
- WeakReferenceEnumerator.cs
- FamilyCollection.cs
- KeyTimeConverter.cs
- XmlSchemaProviderAttribute.cs
- CatalogPartChrome.cs
- AesManaged.cs
- ImportContext.cs