0

いくつかのサービスを含む単純な WCF サービス プロジェクトを作成しました。Main()コンソール アプリ、Application_Start()WPF App.cs、または ASP.NET global.asax.cs のようにプロジェクト エントリ ロジックを定義する方法は?

4

1 に答える 1

0

Put the logic in the static constructor of the Service class. If Service is IService1, put it in

static Service1() {

}

It will be called only once one service start.

于 2013-07-07T15:24:17.393 に答える