SessionClosing 이벤트

Occurs when the session between the server that has the running instance of Analysis Services and the client starts to close, but before the session is finally closed.

네임스페이스:  Microsoft.AnalysisServices.AdomdServer
어셈블리:  msmgdsrv.dll의 msmgdsrv

구문

‘선언
Public Event SessionClosing As EventHandler
‘사용 방법
Dim instance As Server
Dim handler As EventHandler

AddHandler instance.SessionClosing, handler
public event EventHandler SessionClosing
public:
 event EventHandler^ SessionClosing {
    void add (EventHandler^ value);
    void remove (EventHandler^ value);
}
member SessionClosing : IEvent<EventHandler,
    EventArgs>
Jscript는 이벤트 사용을 지원하지만 새로운 이벤트 선언은 지원하지 않습니다.

주의

The following code is part of the Analysis Services Personalization Extensions (ASPE) and shows how to use the SessionClosing and SessionOpened events.

[!참고]

The following sample code can also be downloaded from the Microsoft SQL Server Samples and Community Projects Web site. For more information about how to download and install samples, see Installing SQL Server Samples and Sample Databases in SQL Server Books Online.

예제

using System;

using System.Collections.Generic;

using System.Text;

using Microsoft.AnalysisServices.AdomdServer;

namespace ISV_1.ASClientExtensions

{

[PlugInAttribute]

public class ASClientExtensions

{

public ASClientExtensions()

{

Context.Server.SessionOpened += new EventHandler(this.SessionOpened);

Context.Server.SessionClosing += new EventHandler(this.SessionClosing);

//Verify and set environment for ClientExtensions.

AuthoringAndManagement environment = new AuthoringAndManagement();

}

~ASClientExtensions()

{

}

public void SessionOpened(object sender, EventArgs e)

{

// This will subscribe to the events.

SessionMgr session = new SessionMgr();

}

public void SessionClosing(object sender, EventArgs e)

{

}

}

}