共用方式為


PlugInAttribute 建構函式

Initializes a new instance of the PlugInAttribute class.

命名空間:  Microsoft.AnalysisServices.AdomdServer
組件:  msmgdsrv (在 msmgdsrv.dll 中)

語法

'宣告
Public Sub New
'用途
Dim instance As New PlugInAttribute()
public PlugInAttribute()
public:
PlugInAttribute()
new : unit -> PlugInAttribute
public function PlugInAttribute()

備註

The following code is part of the Analysis Services Personalization Extensions (ASPE) and shows how to use the PlugInAttribute custom attribute to tag your code.

[!附註]

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)

{

}

}

}

請參閱

參考

PlugInAttribute 類別

Microsoft.AnalysisServices.AdomdServer 命名空間