public CustomerRegistrationPresenter(ICustomerRegistrationView view) : this( view, Resolve.DependencyFor <ICustomerRegistrationPresentationMapper>( ), Resolve.DependencyFor <IRegistrationTasks>( ) ) { }
public RegistrationTasks() : this( Resolve.DependencyFor <IBrokenRulesToDisplayItemMapper>( ), Resolve.DependencyFor <ICustomerRepository>( ) ) { }
public AvailableSlipsPresenter(IAvailableSlipsView view) : this( view, Resolve.DependencyFor <ICatalogTasks>( ) ) { }
public CatalogTasks() : this( Resolve.DependencyFor< ISlipsRepository >( ), Resolve.DependencyFor< ISlipsToDisplayDTOMapper >( ), Resolve.DependencyFor< IDockRepository >( ), Resolve.DependencyFor< IDockToDisplayDTOMapper >( ) ) {}
public DockPresenter(IDockView view) : this( view, Resolve.DependencyFor <IHttpRequest>( ), Resolve.DependencyFor <ICatalogTasks>( ) ) { }
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>( ) ) { }
public static ILogger For <T>(T typeToCreateLoggerFor) { try { return(Resolve.DependencyFor <ILogFactory>().CreateFor(typeof(T))); } catch { return(new Log4NetLogFactory().CreateFor(typeof(T))); } }
public LoginPresenter(ILoginView view) : this( view, Resolve.DependencyFor <IHttpRequest>( ), Resolve.DependencyFor <IAuthenticationTask>( ), Resolve.DependencyFor <ILoginCredentialsMapper>( ) ) { }
public CustomerDataMapper() : this ( Resolve.DependencyFor <IDatabaseGateway>( ), Resolve.DependencyFor <IBoatDataMapper>( ), Resolve.DependencyFor <ILeaseDataMapper>( ), Resolve.DependencyFor <IRegistrationDataMapper>( ) ) { }
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( ))); }
public LeaseSlipPresenter(ILeaseSlipView view) : this( view, Resolve.DependencyFor <IHttpRequest>( ), Resolve.DependencyFor <ICatalogTasks>( ), Resolve.DependencyFor <ILeaseTasks>( ), Resolve.DependencyFor <ILeaseRequestDtoFromHttpRequestMapper>( ) ) { }
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)); }
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( )); }
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); }
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(); } }
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); }
public LeaseDataMapper() : this(Resolve.DependencyFor <IDatabaseGateway>( ), Resolve.DependencyFor <ISlipDataMapper>( )) { }
public SlipsRepository() : this(Resolve.DependencyFor <ISlipDataMapper>( )) { }
public DockRepository() : this(Resolve.DependencyFor <IDockDataMapper>( )) { }
public AvailableSlipsWebView() : this( ViewLuggage.TransporterFor(ViewLuggageTickets.AvailableSlips), Resolve.DependencyFor <IHttpGateway>( )) { }
public ViewRegisteredBoatsPresenter(IRegisteredBoatsView view) : this(view, Resolve.DependencyFor <IRegistrationTasks>( ), Resolve.DependencyFor <IHttpRequest>( )) { }
public LeaseWebServices() : this(Resolve.DependencyFor <ILeaseTasks>( )) { }
public RegistrationWebServices() : this(Resolve.DependencyFor <IRegistrationTasks>( )) { }
public static ILog For(Type type) { return(Resolve.DependencyFor <ILogFactory>( ).CreateFor(type)); }
public DockDataMapper() : this(Resolve.DependencyFor <IDatabaseGateway>( )) { }
public View(string name) : this(name, Resolve.DependencyFor <IHttpGateway>( )) { }
public AuthenticationWebServices() : this(Resolve.DependencyFor <IAuthenticationTask>( )) { }
public DatabaseGateway() : this(Resolve.DependencyFor <IDatabaseConnectionFactory>( )) { }