public List <CounterInfo> GetCounters() { List <CounterInfo> counters = new List <CounterInfo>(); try { using (Counters.Dalc.CountersDataAccess countersDataAccess = new Counters.Dalc.CountersDataAccess()) { CountersDataSet.CountersDataTable table = countersDataAccess.GetCounters(); foreach (CountersDataSet.CountersRow r in table) { CounterInfo counter = new CounterInfo(); counter.Id = r.id; counter.CounterValue = r.value; counters.Add(counter); } } } catch (InvalidOperationException ex) { throw new FaultException(ex.Message); } return(counters); }
public void SetCounter2(int counterValue) { using (Counters.Dalc.CountersDataAccess countersDataAccess = new Counters.Dalc.CountersDataAccess()) { countersDataAccess.SetCounter2(counterValue); } }
public void SetCounter2(int counterValue) { TraceTransactionInfo("SetCounter2()"); using (Counters.Dalc.CountersDataAccess countersDataAccess = new Counters.Dalc.CountersDataAccess()) { countersDataAccess.SetCounter2(counterValue); } }
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); }
public void ResetCounters() { TraceTransactionInfo("ResetCounters()"); using (Counters.Dalc.CountersDataAccess countersDataAccess = new Counters.Dalc.CountersDataAccess()) { countersDataAccess.SetCounter1(0); countersDataAccess.SetCounter2(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); }
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); } }
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); } }
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(); } }
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(); } }
public List <CounterInfo> GetCounters() { List <CounterInfo> counters = new List <CounterInfo>(); using (Counters.Dalc.CountersDataAccess countersDataAccess = new Counters.Dalc.CountersDataAccess()) { CountersDataSet.CountersDataTable table = countersDataAccess.GetCounters(); foreach (CountersDataSet.CountersRow r in table) { CounterInfo counter = new CounterInfo(); counter.Id = r.id; counter.CounterValue = r.value; counters.Add(counter); } } return(counters); }
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(); //} }
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); } }