Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- DynamicDataRoute.cs
- DesignTimeParseData.cs
- TabRenderer.cs
- WorkflowWebService.cs
- PathSegmentCollection.cs
- DataRowCollection.cs
- ListMarkerSourceInfo.cs
- RequiredAttributeAttribute.cs
- XPathAxisIterator.cs
- Timer.cs
- Predicate.cs
- RenderingBiasValidation.cs
- SizeLimitedCache.cs
- InstanceDataCollection.cs
- ViewDesigner.cs
- LinqMaximalSubtreeNominator.cs
- Annotation.cs
- PointConverter.cs
- latinshape.cs
- ComplexBindingPropertiesAttribute.cs
- ToolStripTextBox.cs
- InvalidTimeZoneException.cs
- CompiledXpathExpr.cs
- ExtensionsSection.cs
- InputLanguageCollection.cs
- RegexGroup.cs
- ProcessHostConfigUtils.cs
- DataGridViewCell.cs
- XmlLanguageConverter.cs
- DataGridViewButtonColumn.cs
- XmlReaderDelegator.cs
- SecurityTokenAuthenticator.cs
- SafeSecurityHelper.cs
- RuntimeConfigLKG.cs
- NegotiateStream.cs
- SessionEndedEventArgs.cs
- Bidi.cs
- SendActivityEventArgs.cs
- Parameter.cs
- BezierSegment.cs
- AddInToken.cs
- HttpProfileBase.cs
- RadioButton.cs
- TabControlCancelEvent.cs
- BinaryMethodMessage.cs
- Formatter.cs
- X509CertificateValidator.cs
- _IPv4Address.cs
- CallTemplateAction.cs
- RawStylusInputReport.cs
- TypedTableHandler.cs
- XmlSchemaComplexContent.cs
- LongValidator.cs
- ListViewSelectEventArgs.cs
- UniformGrid.cs
- ReaderWriterLockSlim.cs
- DeflateStreamAsyncResult.cs
- LookupNode.cs
- CompiledQueryCacheEntry.cs
- WindowsIdentity.cs
- ToolStripProgressBar.cs
- CodeBinaryOperatorExpression.cs
- RtfControlWordInfo.cs
- TextEditorMouse.cs
- unitconverter.cs
- ReflectionTypeLoadException.cs
- CodeComment.cs
- DataServiceQueryProvider.cs
- Roles.cs
- XmlDataSource.cs
- FontWeightConverter.cs
- NumberFunctions.cs
- EntityKeyElement.cs
- DictionaryBase.cs
- InitializerFacet.cs
- TextParagraphProperties.cs
- AnnotationService.cs
- RelationshipFixer.cs
- SymbolDocumentGenerator.cs
- PersonalizationAdministration.cs
- KnownTypes.cs
- OSEnvironmentHelper.cs
- TransformProviderWrapper.cs
- CommandField.cs
- DBBindings.cs
- WebPartZoneDesigner.cs
- SqlNodeTypeOperators.cs
- XPathEmptyIterator.cs
- MenuItemCollection.cs
- MetadataArtifactLoaderXmlReaderWrapper.cs
- CriticalExceptions.cs
- Sql8ConformanceChecker.cs
- Executor.cs
- MergePropertyDescriptor.cs
- PlanCompiler.cs
- UnsafeMethods.cs
- ObjectCloneHelper.cs
- TextElementCollectionHelper.cs
- ActivationArguments.cs
- CompiledQuery.cs