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
- FileInfo.cs
- DocumentCollection.cs
- NativeCppClassAttribute.cs
- StorageSetMapping.cs
- SiteMapProvider.cs
- SpeechDetectedEventArgs.cs
- OrCondition.cs
- EpmCustomContentSerializer.cs
- ClientFormsIdentity.cs
- IERequestCache.cs
- FieldInfo.cs
- ChangeInterceptorAttribute.cs
- Page.cs
- HtmlInputCheckBox.cs
- SelectorAutomationPeer.cs
- ConfigurationErrorsException.cs
- GroupBoxRenderer.cs
- BreakRecordTable.cs
- XmlUrlEditor.cs
- BaseParagraph.cs
- DesignerObject.cs
- IDataContractSurrogate.cs
- InfoCardRSAPKCS1SignatureFormatter.cs
- Pair.cs
- _SSPIWrapper.cs
- ComboBoxAutomationPeer.cs
- TagPrefixAttribute.cs
- PersonalizationStateQuery.cs
- OperationResponse.cs
- ChannelManager.cs
- Message.cs
- Relationship.cs
- PrefixQName.cs
- ComplexLine.cs
- InvariantComparer.cs
- NonBatchDirectoryCompiler.cs
- MessageQueueAccessControlEntry.cs
- ProcessModelInfo.cs
- AutoResetEvent.cs
- GeneratedCodeAttribute.cs
- MonthCalendar.cs
- WhitespaceRuleLookup.cs
- PrintPreviewGraphics.cs
- XmlDeclaration.cs
- CompatibleComparer.cs
- CodeNamespace.cs
- DataPagerCommandEventArgs.cs
- ValidatedControlConverter.cs
- BitConverter.cs
- XmlDocument.cs
- OleDbPermission.cs
- InputLanguageManager.cs
- DataSourceControl.cs
- TableItemPatternIdentifiers.cs
- SchemaObjectWriter.cs
- CompositeDataBoundControl.cs
- PermissionListSet.cs
- TypeNameConverter.cs
- ConnectionsZone.cs
- ExpressionEditorSheet.cs
- TCEAdapterGenerator.cs
- WebException.cs
- DictionaryEditChange.cs
- DirectionalLight.cs
- IODescriptionAttribute.cs
- TextAction.cs
- PreProcessInputEventArgs.cs
- SingleTagSectionHandler.cs
- ConfigurationElement.cs
- FullTextLine.cs
- SQLDouble.cs
- BuildProvider.cs
- TargetControlTypeCache.cs
- Int32Rect.cs
- MinimizableAttributeTypeConverter.cs
- Symbol.cs
- RemotingSurrogateSelector.cs
- PanelContainerDesigner.cs
- TreeViewDesigner.cs
- ViewGenResults.cs
- VectorKeyFrameCollection.cs
- CodeDomComponentSerializationService.cs
- DesignerCommandSet.cs
- IntSecurity.cs
- CodeSnippetTypeMember.cs
- SignedXmlDebugLog.cs
- LeafCellTreeNode.cs
- WorkflowTraceTransfer.cs
- VersionConverter.cs
- Column.cs
- _DisconnectOverlappedAsyncResult.cs
- InstanceNormalEvent.cs
- WhitespaceRule.cs
- XmlQueryCardinality.cs
- ExtensionDataReader.cs
- XmlSerializerFactory.cs
- WCFModelStrings.Designer.cs
- DataMemberConverter.cs
- ExtensibleClassFactory.cs
- SafeNativeMethods.cs