Esempio n. 1
0
 /// <summary>
 /// Queries the specified service.
 /// </summary>
 /// <param name="service">The service.</param>
 /// <param name="webServiceClient">The web service client.</param>
 /// <param name="bookAction">The book action.</param>
 private static void Query(ITimeService service, ITimeWebService webServiceClient, IBookAction bookAction)
 {
     for (int i = 0; i < QUERIES; i++)
     {
         Console.WriteLine("Server time (Service):    \t{0}", service.WhatTimeIsIt());
         Console.WriteLine("Server time (Web Service):\t{0}", webServiceClient.WhatTimeIsIt());
         Console.WriteLine("Server time + 1 Month:    \t{0}", webServiceClient.AddMonths(1));
         bookAction.PerformAction();
         Thread.Sleep(SLEEP);
     }
 }
Esempio n. 2
0
 public DeleteModel(IBookAction bookAction)
 {
     this.bookAction = bookAction;
 }
 public ListModel(IConfiguration config, IBookAction bookAction)
 {
     this.config     = config;
     this.bookAction = bookAction;
 }
 public BookCountViewComponent(IBookAction bookAction)
 {
     this.bookAction = bookAction;
 }
Esempio n. 5
0
 public AddModel(IBookAction bookAction)
 {
     this.bookAction = bookAction;
 }
 public EditModel(IBookAction bookAction)
 {
     this.bookAction = bookAction;
 }
 /// <summary>
 /// Queries the specified service.
 /// </summary>
 /// <param name="service">The service.</param>
 /// <param name="webServiceClient">The web service client.</param>
 /// <param name="bookAction">The book action.</param>
 private static void Query(ITimeService service, ITimeWebService webServiceClient, IBookAction bookAction)
 {
     for (int i = 0; i < QUERIES; i++)
     {
         Console.WriteLine("Server time (Service):    \t{0}", service.WhatTimeIsIt());
         Console.WriteLine("Server time (Web Service):\t{0}", webServiceClient.WhatTimeIsIt());
         Console.WriteLine("Server time + 1 Month:    \t{0}", webServiceClient.AddMonths(1));
         bookAction.PerformAction();
         Thread.Sleep(SLEEP);
     }
 }