Esempio n. 1
0
 protected override void ProcessRecord()
 {
     if (ShouldProcess(Environment.MachineName))
     {
         DtcSetup.StartDtcIfNecessary();
     }
 }
Esempio n. 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);
        }