Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Data / System / Data / Common / DbDataReader.cs / 1305376 / DbDataReader.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //[....] //----------------------------------------------------------------------------- namespace System.Data.Common { using System; using System.Collections; using System.ComponentModel; using System.Data; public abstract class DbDataReader : MarshalByRefObject, IDataReader, IEnumerable { // V1.2.3300 protected DbDataReader() : base() { } abstract public int Depth { get; } abstract public int FieldCount { get; } abstract public bool HasRows { get; } abstract public bool IsClosed { get; } abstract public int RecordsAffected { get; } virtual public int VisibleFieldCount { // NOTE: This is virtual because not all providers may choose to support // this property, since it was added in Whidbey get { return FieldCount; } } abstract public object this [ int ordinal ] { get; } abstract public object this [ string name ] { get; } abstract public void Close(); [ EditorBrowsableAttribute(EditorBrowsableState.Never) ] public void Dispose() { Dispose(true); } protected virtual void Dispose(bool disposing) { if (disposing) { Close(); } } abstract public string GetDataTypeName(int ordinal); [ EditorBrowsableAttribute(EditorBrowsableState.Never) ] abstract public IEnumerator GetEnumerator(); abstract public Type GetFieldType(int ordinal); abstract public string GetName(int ordinal); abstract public int GetOrdinal(string name); abstract public DataTable GetSchemaTable(); abstract public bool GetBoolean(int ordinal); abstract public byte GetByte(int ordinal); abstract public long GetBytes(int ordinal, long dataOffset, byte[] buffer, int bufferOffset, int length); abstract public char GetChar(int ordinal); abstract public long GetChars(int ordinal, long dataOffset, char[] buffer, int bufferOffset, int length); [ EditorBrowsableAttribute(EditorBrowsableState.Never) ] public DbDataReader GetData(int ordinal) { return GetDbDataReader(ordinal); } IDataReader IDataRecord.GetData(int ordinal) { return GetDbDataReader(ordinal); } virtual protected DbDataReader GetDbDataReader(int ordinal) { // NOTE: This method is virtual because we're required to implement // it however most providers won't support it. Only the OLE DB // provider supports it right now, and they can override it. throw ADP.NotSupported(); } abstract public DateTime GetDateTime(int ordinal); abstract public Decimal GetDecimal(int ordinal); abstract public double GetDouble(int ordinal); abstract public float GetFloat(int ordinal); abstract public Guid GetGuid(int ordinal); abstract public Int16 GetInt16(int ordinal); abstract public Int32 GetInt32(int ordinal); abstract public Int64 GetInt64(int ordinal); [ EditorBrowsableAttribute(EditorBrowsableState.Never) ] virtual public Type GetProviderSpecificFieldType(int ordinal) { // NOTE: This is virtual because not all providers may choose to support // this method, since it was added in Whidbey. return GetFieldType(ordinal); } [ EditorBrowsableAttribute(EditorBrowsableState.Never) ] virtual public Object GetProviderSpecificValue(int ordinal) { // NOTE: This is virtual because not all providers may choose to support // this method, since it was added in Whidbey return GetValue(ordinal); } [ EditorBrowsableAttribute(EditorBrowsableState.Never) ] virtual public int GetProviderSpecificValues(object[] values) { // NOTE: This is virtual because not all providers may choose to support // this method, since it was added in Whidbey return GetValues(values); } abstract public String GetString(int ordinal); abstract public Object GetValue(int ordinal); abstract public int GetValues(object[] values); abstract public bool IsDBNull(int ordinal); abstract public bool NextResult(); abstract public bool Read(); } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //[....] //----------------------------------------------------------------------------- namespace System.Data.Common { using System; using System.Collections; using System.ComponentModel; using System.Data; public abstract class DbDataReader : MarshalByRefObject, IDataReader, IEnumerable { // V1.2.3300 protected DbDataReader() : base() { } abstract public int Depth { get; } abstract public int FieldCount { get; } abstract public bool HasRows { get; } abstract public bool IsClosed { get; } abstract public int RecordsAffected { get; } virtual public int VisibleFieldCount { // NOTE: This is virtual because not all providers may choose to support // this property, since it was added in Whidbey get { return FieldCount; } } abstract public object this [ int ordinal ] { get; } abstract public object this [ string name ] { get; } abstract public void Close(); [ EditorBrowsableAttribute(EditorBrowsableState.Never) ] public void Dispose() { Dispose(true); } protected virtual void Dispose(bool disposing) { if (disposing) { Close(); } } abstract public string GetDataTypeName(int ordinal); [ EditorBrowsableAttribute(EditorBrowsableState.Never) ] abstract public IEnumerator GetEnumerator(); abstract public Type GetFieldType(int ordinal); abstract public string GetName(int ordinal); abstract public int GetOrdinal(string name); abstract public DataTable GetSchemaTable(); abstract public bool GetBoolean(int ordinal); abstract public byte GetByte(int ordinal); abstract public long GetBytes(int ordinal, long dataOffset, byte[] buffer, int bufferOffset, int length); abstract public char GetChar(int ordinal); abstract public long GetChars(int ordinal, long dataOffset, char[] buffer, int bufferOffset, int length); [ EditorBrowsableAttribute(EditorBrowsableState.Never) ] public DbDataReader GetData(int ordinal) { return GetDbDataReader(ordinal); } IDataReader IDataRecord.GetData(int ordinal) { return GetDbDataReader(ordinal); } virtual protected DbDataReader GetDbDataReader(int ordinal) { // NOTE: This method is virtual because we're required to implement // it however most providers won't support it. Only the OLE DB // provider supports it right now, and they can override it. throw ADP.NotSupported(); } abstract public DateTime GetDateTime(int ordinal); abstract public Decimal GetDecimal(int ordinal); abstract public double GetDouble(int ordinal); abstract public float GetFloat(int ordinal); abstract public Guid GetGuid(int ordinal); abstract public Int16 GetInt16(int ordinal); abstract public Int32 GetInt32(int ordinal); abstract public Int64 GetInt64(int ordinal); [ EditorBrowsableAttribute(EditorBrowsableState.Never) ] virtual public Type GetProviderSpecificFieldType(int ordinal) { // NOTE: This is virtual because not all providers may choose to support // this method, since it was added in Whidbey. return GetFieldType(ordinal); } [ EditorBrowsableAttribute(EditorBrowsableState.Never) ] virtual public Object GetProviderSpecificValue(int ordinal) { // NOTE: This is virtual because not all providers may choose to support // this method, since it was added in Whidbey return GetValue(ordinal); } [ EditorBrowsableAttribute(EditorBrowsableState.Never) ] virtual public int GetProviderSpecificValues(object[] values) { // NOTE: This is virtual because not all providers may choose to support // this method, since it was added in Whidbey return GetValues(values); } abstract public String GetString(int ordinal); abstract public Object GetValue(int ordinal); abstract public int GetValues(object[] values); abstract public bool IsDBNull(int ordinal); abstract public bool NextResult(); abstract public bool Read(); } } // 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
- SoapIgnoreAttribute.cs
- XPathNavigatorKeyComparer.cs
- SecurityRuntime.cs
- Stroke.cs
- EditModeSwitchButton.cs
- TextViewSelectionProcessor.cs
- XamlHostingSection.cs
- DataGridRow.cs
- UInt32Converter.cs
- NameSpaceEvent.cs
- CompositeControlDesigner.cs
- TrackBarRenderer.cs
- XmlEventCache.cs
- OleDbEnumerator.cs
- MemberInfoSerializationHolder.cs
- TreeNodeStyle.cs
- Int16Storage.cs
- TextStore.cs
- XmlSchemaSimpleType.cs
- PrintingPermission.cs
- BoolLiteral.cs
- Rotation3DAnimationBase.cs
- SmiTypedGetterSetter.cs
- SamlAuthorityBinding.cs
- IRCollection.cs
- TableItemStyle.cs
- TimeoutValidationAttribute.cs
- OleDbParameter.cs
- VirtualPath.cs
- FixedSOMLineCollection.cs
- LockRenewalTask.cs
- ChangeConflicts.cs
- SymmetricSecurityProtocolFactory.cs
- FilteredDataSetHelper.cs
- FastEncoder.cs
- ScriptReference.cs
- UnicastIPAddressInformationCollection.cs
- Conditional.cs
- MsmqIntegrationOutputChannel.cs
- SafeReadContext.cs
- RedBlackList.cs
- RijndaelManagedTransform.cs
- ImageCodecInfoPrivate.cs
- _RequestCacheProtocol.cs
- StylusPointPropertyInfoDefaults.cs
- PageThemeCodeDomTreeGenerator.cs
- RegexBoyerMoore.cs
- TryExpression.cs
- EventWaitHandleSecurity.cs
- BuildManager.cs
- XmlDataSource.cs
- ToolboxDataAttribute.cs
- FastEncoderWindow.cs
- StoreAnnotationsMap.cs
- StackBuilderSink.cs
- BindingNavigator.cs
- PackageFilter.cs
- StrokeRenderer.cs
- SingleConverter.cs
- DesignSurfaceEvent.cs
- Itemizer.cs
- ToolStripItemCollection.cs
- AttachedPropertyDescriptor.cs
- relpropertyhelper.cs
- TriggerCollection.cs
- MimeTypeMapper.cs
- CodeConditionStatement.cs
- OlePropertyStructs.cs
- DesignerAdapterUtil.cs
- SapiRecognizer.cs
- SymbolPair.cs
- Size3D.cs
- ScriptComponentDescriptor.cs
- DataGridViewImageColumn.cs
- StandardCommands.cs
- AssociationTypeEmitter.cs
- NullableConverter.cs
- COSERVERINFO.cs
- ObjectIDGenerator.cs
- SafeEventLogReadHandle.cs
- Compiler.cs
- TreeNodeStyle.cs
- MachineKeyValidationConverter.cs
- StyleBamlRecordReader.cs
- FileDocument.cs
- ClientSession.cs
- TemplateLookupAction.cs
- Vector3dCollection.cs
- EnumerableValidator.cs
- HtmlSelect.cs
- CardSpaceShim.cs
- ISCIIEncoding.cs
- CatalogPartChrome.cs
- RuntimeConfig.cs
- ViewManager.cs
- TextBoxBase.cs
- WindowAutomationPeer.cs
- SqlSupersetValidator.cs
- Proxy.cs
- SiteMapDataSourceView.cs