public CustomerRegistrationPresenter(ICustomerRegistrationView view) : this(
         view,
         Resolve.DependencyFor <ICustomerRegistrationPresentationMapper>( ),
         Resolve.DependencyFor <IRegistrationTasks>( )
         )
 {
 }
Example #2
0
 public RegistrationTasks()
     : this(
         Resolve.DependencyFor <IBrokenRulesToDisplayItemMapper>( ),
         Resolve.DependencyFor <ICustomerRepository>( )
         )
 {
 }
Example #3
0
 public AvailableSlipsPresenter(IAvailableSlipsView view)
     : this(
         view,
         Resolve.DependencyFor <ICatalogTasks>( )
         )
 {
 }
Example #4
0
		public CatalogTasks()
			: this(
				Resolve.DependencyFor< ISlipsRepository >( ),
				Resolve.DependencyFor< ISlipsToDisplayDTOMapper >( ),
				Resolve.DependencyFor< IDockRepository >( ),
				Resolve.DependencyFor< IDockToDisplayDTOMapper >( )
				) {}
Example #5
0
 public DockPresenter(IDockView view)
     : this(
         view,
         Resolve.DependencyFor <IHttpRequest>( ),
         Resolve.DependencyFor <ICatalogTasks>( )
         )
 {
 }
Example #6
0
 public RegisterBoatPresenter(IRegisterBoatView view)
     : this(view,
            Resolve.DependencyFor <IHttpRequest>( ),
            Resolve.DependencyFor <IRegistrationTasks>( ),
            Resolve.DependencyFor <INewBoatRegistrationMapper>( )
            )
 {
 }
 public UpdateCustomerRegistrationPresenter(IUpdateRegistrationView view) :
     this(
         view,
         Resolve.DependencyFor <IHttpRequest>( ),
         Resolve.DependencyFor <IRegistrationTasks>( ),
         Resolve.DependencyFor <IUpdateRegistrationPresentationMapper>( )
         )
 {
 }
Example #8
0
 public static ILogger For <T>(T typeToCreateLoggerFor)
 {
     try {
         return(Resolve.DependencyFor <ILogFactory>().CreateFor(typeof(T)));
     }
     catch {
         return(new Log4NetLogFactory().CreateFor(typeof(T)));
     }
 }
Example #9
0
 public LoginPresenter(ILoginView view)
     : this(
         view,
         Resolve.DependencyFor <IHttpRequest>( ),
         Resolve.DependencyFor <IAuthenticationTask>( ),
         Resolve.DependencyFor <ILoginCredentialsMapper>( )
         )
 {
 }
Example #10
0
 public CustomerDataMapper() : this
     (
         Resolve.DependencyFor <IDatabaseGateway>( ),
         Resolve.DependencyFor <IBoatDataMapper>( ),
         Resolve.DependencyFor <ILeaseDataMapper>( ),
         Resolve.DependencyFor <IRegistrationDataMapper>( )
     )
 {
 }
Example #11
0
        public static long CreateCustomerRecord()
        {
            IInsertQueryBuilder builder = DatabaseInsert.Into(CustomerTable.TableName)
                                          .AddValue(CustomerTable.FirstName, string.Empty)
                                          .AddValue(CustomerTable.LastName, string.Empty)
                                          .AddValue(CustomerTable.Phone, string.Empty)
                                          .AddValue(CustomerTable.City, string.Empty);

            return(Resolve.DependencyFor <IDatabaseGateway>( ).ExecuteScalar(builder.Build( )));
        }
Example #12
0
 public LeaseSlipPresenter(ILeaseSlipView view)
     : this(
         view,
         Resolve.DependencyFor <IHttpRequest>( ),
         Resolve.DependencyFor <ICatalogTasks>( ),
         Resolve.DependencyFor <ILeaseTasks>( ),
         Resolve.DependencyFor <ILeaseRequestDtoFromHttpRequestMapper>( )
         )
 {
 }
Example #13
0
        public static long CreateSlip()
        {
            IQuery query = DatabaseInsert
                           .Into(SlipTable.TableName)
                           .AddValue(SlipTable.DockID, 1)
                           .AddValue(SlipTable.Length, 100)
                           .AddValue(SlipTable.Width, 100).Build( );

            return(Resolve.DependencyFor <IDatabaseGateway>( ).ExecuteScalar(query));
        }
        private long CreateCustomerRecord()
        {
            IQuery query = DatabaseInsert.Into(CustomerTable.TableName)
                           .AddValue(CustomerTable.FirstName, string.Empty)
                           .AddValue(CustomerTable.LastName, string.Empty)
                           .AddValue(CustomerTable.Phone, string.Empty)
                           .AddValue(CustomerTable.City, string.Empty).Build( );

            return(Resolve.DependencyFor <IDatabaseGateway>( ).ExecuteScalar(query));
        }
Example #15
0
        public static void AddBoatsFor(long customerId)
        {
            IInsertQueryBuilder builder = DatabaseInsert.Into(BoatTable.TableName)
                                          .AddValue(BoatTable.RegistrationNumber, string.Empty)
                                          .AddValue(BoatTable.Manufacturer, string.Empty)
                                          .AddValue(BoatTable.ModelYear, string.Empty)
                                          .AddValue(BoatTable.Length, string.Empty)
                                          .AddValue(BoatTable.CustomerID, customerId.ToString( ));

            Resolve.DependencyFor <IDatabaseGateway>( ).Execute(builder.Build( ), builder.Build( ), builder.Build( ));
        }
Example #16
0
        public static void CreateLeaseFor(long customerId)
        {
            IQuery query = DatabaseInsert
                           .Into(LeaseTable.TableName)
                           .AddValue(LeaseTable.CustomerID, customerId)
                           .AddValue(LeaseTable.EndDate, DateTime.Now.AddDays(1))
                           .AddValue(LeaseTable.LeaseTypeID, 1)
                           .AddValue(LeaseTable.SlipID, SlipMother.CreateSlip( ))
                           .AddValue(LeaseTable.StartDate, DateTime.Now).Build( );

            Resolve.DependencyFor <IDatabaseGateway>( ).Execute(query);
        }
Example #17
0
 private static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     Application.ThreadException += (sender, e) => e.Exception.LogError();
     try {
         Start.TheApplication();
         Application.Run(Resolve.DependencyFor <NotepadApplicationContext>());
     }
     catch (Exception e1) {
         e1.LogError();
     }
 }
Example #18
0
        public static long CreateCustomerRecordWith(string username)
        {
            IInsertQueryBuilder builder = DatabaseInsert.Into(CustomerTable.TableName)
                                          .AddValue(CustomerTable.FirstName, string.Empty)
                                          .AddValue(CustomerTable.LastName, string.Empty)
                                          .AddValue(CustomerTable.Phone, string.Empty)
                                          .AddValue(CustomerTable.City, string.Empty);
            long customerId = Resolve.DependencyFor <IDatabaseGateway>( ).ExecuteScalar(builder.Build( ));

            IQuery insertToAuthTable = DatabaseInsert.Into(AuthorizationTable.TableName)
                                       .AddValue(AuthorizationTable.UserName, username)
                                       .AddValue(AuthorizationTable.Password, string.Empty)
                                       .Build( );

            Resolve.DependencyFor <IDatabaseGateway>( ).Execute(insertToAuthTable);
            return(customerId);
        }
Example #19
0
 public LeaseDataMapper()
     : this(Resolve.DependencyFor <IDatabaseGateway>( ), Resolve.DependencyFor <ISlipDataMapper>( ))
 {
 }
Example #20
0
 public SlipsRepository() : this(Resolve.DependencyFor <ISlipDataMapper>( ))
 {
 }
Example #21
0
 public DockRepository() : this(Resolve.DependencyFor <IDockDataMapper>( ))
 {
 }
Example #22
0
 public AvailableSlipsWebView()
     : this(
         ViewLuggage.TransporterFor(ViewLuggageTickets.AvailableSlips),
         Resolve.DependencyFor <IHttpGateway>( ))
 {
 }
Example #23
0
 public ViewRegisteredBoatsPresenter(IRegisteredBoatsView view)
     : this(view, Resolve.DependencyFor <IRegistrationTasks>( ), Resolve.DependencyFor <IHttpRequest>( ))
 {
 }
Example #24
0
 public LeaseWebServices() : this(Resolve.DependencyFor <ILeaseTasks>( ))
 {
 }
Example #25
0
 public RegistrationWebServices() : this(Resolve.DependencyFor <IRegistrationTasks>( ))
 {
 }
Example #26
0
File: Log.cs Project: xlgmokha/sait
 public static ILog For(Type type)
 {
     return(Resolve.DependencyFor <ILogFactory>( ).CreateFor(type));
 }
Example #27
0
 public DockDataMapper() : this(Resolve.DependencyFor <IDatabaseGateway>( ))
 {
 }
Example #28
0
 public View(string name) : this(name, Resolve.DependencyFor <IHttpGateway>( ))
 {
 }
Example #29
0
 public AuthenticationWebServices() : this(Resolve.DependencyFor <IAuthenticationTask>( ))
 {
 }
Example #30
0
 public DatabaseGateway() : this(Resolve.DependencyFor <IDatabaseConnectionFactory>( ))
 {
 }