コード例 #1
0
ファイル: ServiceContract.cs プロジェクト: staherianYMCA/test
        public string DoSmth(string inp)
        {
            EventLog
                tmpEventLog = new EventLog();

            tmpEventLog.Source = "Test WCF";

            tmpEventLog.WriteEntry(string.Format("ServiceContract.DoSmth({0}) before sleep", inp), EventLogEntryType.Information);
            Thread.Sleep(mSec);
            tmpEventLog.WriteEntry(string.Format("ServiceContract.DoSmth({0}) after sleep", inp), EventLogEntryType.Information);

            tmpEventLog.WriteEntry(string.Format("ServiceContract.DoSmth({0}) before BusinessLogic.DoSmth()", inp), EventLogEntryType.Information);

            string
                result = _businessLogic.DoSmth(inp);

            tmpEventLog.WriteEntry(string.Format("ServiceContract.DoSmth({0}) after BusinessLogic.DoSmth()", inp), EventLogEntryType.Information);

            return(result);
        }
コード例 #2
0
 public string DoSmth(string inp)
 {
     return(_businessLogic.DoSmth(inp));
 }