Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / Data / Microsoft / SqlServer / Server / SmiConnection.cs / 1 / SmiConnection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //[....] //----------------------------------------------------------------------------- namespace Microsoft.SqlServer.Server { using System; using System.Data; internal abstract class SmiConnection : IDisposable { // // Miscellaneous directives / accessors // internal abstract string GetCurrentDatabase( SmiEventSink eventSink ); internal abstract void SetCurrentDatabase ( string databaseName, SmiEventSink eventSink ); // // IDisposable // public virtual void Dispose( ) { // Obsoleting from SMI -- use Close( SmiEventSink ) instead. // Intended to be removed (along with inheriting IDisposable) prior to RTM. // Implement body with throw because there are only a couple of ways to get to this code: // 1) Client is calling this method even though the server negotiated for V3+ and dropped support for V2-. // 2) Server didn't implement V2- on some interface and negotiated V2-. System.Data.Common.ADP.InternalError( System.Data.Common.ADP.InternalErrorCode.UnimplementedSMIMethod ); } public virtual void Close( SmiEventSink eventSink ) { // Adding as of V3 // Implement body with throw because there are only a couple of ways to get to this code: // 1) Client is calling this method even though the server negotiated for V2- and hasn't implemented V3 yet. // 2) Server didn't implement V3 on some interface, but negotiated V3+. System.Data.Common.ADP.InternalError( System.Data.Common.ADP.InternalErrorCode.UnimplementedSMIMethod ); } // // Transaction API (should we encapsulate in it's own class or interface?) // internal abstract void BeginTransaction ( string name, IsolationLevel level, SmiEventSink eventSink ); internal abstract void CommitTransaction ( long transactionId, SmiEventSink eventSink ); internal abstract void CreateTransactionSavePoint ( long transactionId, string name, SmiEventSink eventSink ); internal abstract byte[] GetDTCAddress( // better buffer management needed? I.e. non-allocating call needed/possible? SmiEventSink eventSink ); internal abstract void EnlistTransaction ( byte[] token, // better buffer management needed? I.e. non-allocating call needed/possible? SmiEventSink eventSink ); internal abstract byte[] PromoteTransaction ( // better buffer management needed? I.e. non-allocating call needed/possible? long transactionId, SmiEventSink eventSink ); internal abstract void RollbackTransaction ( long transactionId, string savePointName, // only roll back to save point if name non-null SmiEventSink eventSink ); } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //[....] //----------------------------------------------------------------------------- namespace Microsoft.SqlServer.Server { using System; using System.Data; internal abstract class SmiConnection : IDisposable { // // Miscellaneous directives / accessors // internal abstract string GetCurrentDatabase( SmiEventSink eventSink ); internal abstract void SetCurrentDatabase ( string databaseName, SmiEventSink eventSink ); // // IDisposable // public virtual void Dispose( ) { // Obsoleting from SMI -- use Close( SmiEventSink ) instead. // Intended to be removed (along with inheriting IDisposable) prior to RTM. // Implement body with throw because there are only a couple of ways to get to this code: // 1) Client is calling this method even though the server negotiated for V3+ and dropped support for V2-. // 2) Server didn't implement V2- on some interface and negotiated V2-. System.Data.Common.ADP.InternalError( System.Data.Common.ADP.InternalErrorCode.UnimplementedSMIMethod ); } public virtual void Close( SmiEventSink eventSink ) { // Adding as of V3 // Implement body with throw because there are only a couple of ways to get to this code: // 1) Client is calling this method even though the server negotiated for V2- and hasn't implemented V3 yet. // 2) Server didn't implement V3 on some interface, but negotiated V3+. System.Data.Common.ADP.InternalError( System.Data.Common.ADP.InternalErrorCode.UnimplementedSMIMethod ); } // // Transaction API (should we encapsulate in it's own class or interface?) // internal abstract void BeginTransaction ( string name, IsolationLevel level, SmiEventSink eventSink ); internal abstract void CommitTransaction ( long transactionId, SmiEventSink eventSink ); internal abstract void CreateTransactionSavePoint ( long transactionId, string name, SmiEventSink eventSink ); internal abstract byte[] GetDTCAddress( // better buffer management needed? I.e. non-allocating call needed/possible? SmiEventSink eventSink ); internal abstract void EnlistTransaction ( byte[] token, // better buffer management needed? I.e. non-allocating call needed/possible? SmiEventSink eventSink ); internal abstract byte[] PromoteTransaction ( // better buffer management needed? I.e. non-allocating call needed/possible? long transactionId, SmiEventSink eventSink ); internal abstract void RollbackTransaction ( long transactionId, string savePointName, // only roll back to save point if name non-null SmiEventSink eventSink ); } } // 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
- ObjectListTitleAttribute.cs
- SortedList.cs
- ToggleButtonAutomationPeer.cs
- ExpandSegment.cs
- DeviceSpecificDialogCachedState.cs
- CodeSnippetTypeMember.cs
- SoapBinding.cs
- HtmlInputButton.cs
- ToolStripRenderer.cs
- GridViewCancelEditEventArgs.cs
- Byte.cs
- ListControl.cs
- DesignTimeValidationFeature.cs
- HtmlFormParameterReader.cs
- PreProcessInputEventArgs.cs
- OleStrCAMarshaler.cs
- EditorZone.cs
- WebPartMenuStyle.cs
- DiscreteKeyFrames.cs
- ComponentResourceKey.cs
- ConfigurationCollectionAttribute.cs
- CustomLineCap.cs
- PlaceHolder.cs
- TypeConverterBase.cs
- ParallelQuery.cs
- MruCache.cs
- PageClientProxyGenerator.cs
- XmlSchemaException.cs
- HitTestWithPointDrawingContextWalker.cs
- HtmlForm.cs
- SuppressMessageAttribute.cs
- PanelStyle.cs
- cookiecollection.cs
- FontSource.cs
- WindowsStatic.cs
- DBDataPermission.cs
- NotificationContext.cs
- RegexCompiler.cs
- EntityStoreSchemaGenerator.cs
- AspNetHostingPermission.cs
- XmlKeywords.cs
- ProgramPublisher.cs
- CryptoApi.cs
- ControlLocalizer.cs
- DependentTransaction.cs
- AppDomainUnloadedException.cs
- BamlCollectionHolder.cs
- RegexInterpreter.cs
- StateChangeEvent.cs
- Aggregates.cs
- TreePrinter.cs
- EllipticalNodeOperations.cs
- Rotation3D.cs
- ChameleonKey.cs
- TemplateEditingVerb.cs
- InfoCardRSAPKCS1SignatureFormatter.cs
- DeploymentSection.cs
- DataGridCommandEventArgs.cs
- Menu.cs
- EdmMember.cs
- CommonXSendMessage.cs
- ExpressionLexer.cs
- CompilerScope.Storage.cs
- Identity.cs
- PopupEventArgs.cs
- TextBoxLine.cs
- PropertyEmitterBase.cs
- ServerIdentity.cs
- ADConnectionHelper.cs
- SurrogateEncoder.cs
- CommonProperties.cs
- WebControlsSection.cs
- ResourceFallbackManager.cs
- PageThemeParser.cs
- XMLDiffLoader.cs
- prefixendpointaddressmessagefiltertable.cs
- ValueChangedEventManager.cs
- SspiSafeHandles.cs
- DownloadProgressEventArgs.cs
- RSACryptoServiceProvider.cs
- HtmlInputSubmit.cs
- WeakKeyDictionary.cs
- ValidatorCollection.cs
- XmlAttributeCollection.cs
- _Semaphore.cs
- ToolStripDesigner.cs
- OperationCanceledException.cs
- Attachment.cs
- Ipv6Element.cs
- JavaScriptObjectDeserializer.cs
- MiniMapControl.xaml.cs
- Point4D.cs
- Triplet.cs
- SqlDataSourceCustomCommandPanel.cs
- GroupDescription.cs
- DelegatingTypeDescriptionProvider.cs
- PropertyGridCommands.cs
- Recipient.cs
- DropShadowBitmapEffect.cs
- SoapHeaderException.cs