예제 #1
0
 public void SetCounter2(int counterValue)
 {
     using (Counters.Dalc.CountersDataAccess countersDataAccess = new Counters.Dalc.CountersDataAccess())
     {
         countersDataAccess.SetCounter2(counterValue);
     }
 }
예제 #2
0
        public void SetCounter2(int counterValue)
        {
            TraceTransactionInfo("SetCounter2()");

            using (Counters.Dalc.CountersDataAccess countersDataAccess = new Counters.Dalc.CountersDataAccess())
            {
                countersDataAccess.SetCounter2(counterValue);
            }
        }
예제 #3
0
        public void SetCounter2(int counterValue)
        {
            Console.WriteLine("About to reset counter 2 to {0} on transaction id {1}", counterValue, Transaction.Current.TransactionInformation.DistributedIdentifier);

            using (Counters.Dalc.CountersDataAccess countersDataAccess = new Counters.Dalc.CountersDataAccess())
            {
                countersDataAccess.SetCounter2(counterValue);
            }
            Console.WriteLine("Reset counter 2 to {0} on transaction id {1}", counterValue, Transaction.Current.TransactionInformation.DistributedIdentifier);
        }
예제 #4
0
        public void ResetCounters()
        {
            TraceTransactionInfo("ResetCounters()");

            using (Counters.Dalc.CountersDataAccess countersDataAccess = new Counters.Dalc.CountersDataAccess())
            {
                countersDataAccess.SetCounter1(0);
                countersDataAccess.SetCounter2(0);
            }
        }
예제 #5
0
        public void SetCounter2(int counterValue)
        {
            Console.WriteLine("About to reset counter 2 to {0}", counterValue);

            using (Counters.Dalc.CountersDataAccess countersDataAccess = new Counters.Dalc.CountersDataAccess())
            {
                countersDataAccess.SetCounter2(counterValue);
            }
            Console.WriteLine("Reset counter 2 to {0}", counterValue);
        }
예제 #6
0
        public void ResetCounters()
        {
            Transaction.Current.TransactionCompleted += new TransactionCompletedEventHandler(Current_TransactionCompleted);

            using (Counters.Dalc.CountersDataAccess countersDataAccess = new Counters.Dalc.CountersDataAccess())
            {
                countersDataAccess.SetCounter1(0);
                Thread.Sleep(5000);
                countersDataAccess.SetCounter2(0);
            }
        }
예제 #7
0
 public void SetCounter2(int counterValue)
 {
     try
     {
         using (Counters.Dalc.CountersDataAccess countersDataAccess = new Counters.Dalc.CountersDataAccess())
         {
             countersDataAccess.SetCounter2(counterValue);
         }
     }
     catch (InvalidOperationException ex)
     {
         throw new FaultException(ex.Message);
     }
 }
예제 #8
0
        public void ResetCounters()
        {
            using (TransactionScope scope = new TransactionScope())
            {
                TraceTransactionIds("ResetCounters()");

                using (Counters.Dalc.CountersDataAccess countersDataAccess = new Counters.Dalc.CountersDataAccess())
                {
                    countersDataAccess.SetCounter1(0);
                    countersDataAccess.SetCounter2(0);
                }

                scope.Complete();
            }
        }
예제 #9
0
        public void ResetCounters()
        {
            using (TransactionScope scope = new TransactionScope())
            {
                Console.WriteLine("About to reset counters to {0} on transaction id {1}", 0, Transaction.Current.TransactionInformation.LocalIdentifier);

                using (Counters.Dalc.CountersDataAccess countersDataAccess = new Counters.Dalc.CountersDataAccess())
                {
                    countersDataAccess.SetCounter1(0);
                    countersDataAccess.SetCounter2(0);
                }

                Console.WriteLine("Reset counters to {0} on transaction id {1}", 0, Transaction.Current.TransactionInformation.LocalIdentifier);

                scope.Complete();
            }
        }
예제 #10
0
        public void ResetCounters()
        {
            using (TransactionScope scope = new TransactionScope())
            {
                using (Counters.Dalc.CountersDataAccess countersDataAccess = new Counters.Dalc.CountersDataAccess())
                {
                    countersDataAccess.SetCounter1(0);
                    countersDataAccess.SetCounter2(0);
                }

                scope.Complete();
            }

            //using (Counters.Dalc.CountersDataAccess countersDataAccess = new Counters.Dalc.CountersDataAccess())
            //{
            //    countersDataAccess.ResetCounters();
            //}
        }
예제 #11
0
        public void ResetCounters()
        {
            try
            {
                using (TransactionScope scope = new TransactionScope())
                {
                    using (Counters.Dalc.CountersDataAccess countersDataAccess = new Counters.Dalc.CountersDataAccess())
                    {
                        countersDataAccess.SetCounter1(0);
                        countersDataAccess.SetCounter2(0);
                    }

                    scope.Complete();
                }
            }
            catch (InvalidOperationException ex)
            {
                throw new FaultException(ex.Message);
            }
        }