SmiEventStream.cs 1.3 KB

12345678910111213141516171819202122232425262728293031
  1. //------------------------------------------------------------------------------
  2. // <copyright file="SmiEventStream.cs" company="Microsoft">
  3. // Copyright (c) Microsoft Corporation. All rights reserved.
  4. // </copyright>
  5. // <owner current="true" primary="true">Microsoft</owner>
  6. // <owner current="true" primary="false">Microsoft</owner>
  7. //------------------------------------------------------------------------------
  8. namespace Microsoft.SqlServer.Server {
  9. using System;
  10. internal abstract class SmiEventStream : IDisposable {
  11. internal abstract bool HasEvents { get; }
  12. internal abstract void Close( SmiEventSink sink );
  13. public virtual void Dispose( ) {
  14. // Obsoleting from SMI -- use Close instead.
  15. // Intended to be removed (along with inheriting IDisposable) prior to RTM.
  16. // Implement body with throw because there are only a couple of ways to get to this code:
  17. // 1) Client is calling this method even though the server negotiated for V3+ and dropped support for V2-.
  18. // 2) Server didn't implement V2- on some interface and negotiated V2-.
  19. System.Data.Common.ADP.InternalError( System.Data.Common.ADP.InternalErrorCode.UnimplementedSMIMethod );
  20. }
  21. internal abstract void ProcessEvent( SmiEventSink sink );
  22. }
  23. }