コード例 #1
0
ファイル: InstallDtc.cs プロジェクト: zhenlee/NServiceBus
 protected override void ProcessRecord()
 {
     if (ShouldProcess(Environment.MachineName))
     {
         DtcSetup.StartDtcIfNecessary();
     }
 }
コード例 #2
0
        protected override void Process()
        {
            bool dtcIsGood;

            if (!ShouldProcess(Environment.MachineName))
            {
                dtcIsGood = DtcSetup.StartDtcIfNecessary();
                Host.UI.WriteLine(dtcIsGood
                                          ? "DTC is setup and ready for use with NServiceBus"
                                          : "DTC is not properly configured");

                WriteObject(dtcIsGood);
                return;
            }

            dtcIsGood = DtcSetup.StartDtcIfNecessary(true);

            WriteObject(dtcIsGood);
        }