static partial void CreateController <C>(IContext context, ref IControllerAccess <C> controller) where C : IIdentifiable { if (typeof(C) == typeof(CashCow.Contracts.Persistence.CashCow.ICashEvent)) { controller = new Controllers.Persistance.CashEventController(context) as IControllerAccess <C>; } }
static partial void CreateController <C>(ControllerObject controllerObject, ref IControllerAccess <C> controller) where C : IIdentifiable { controllerObject.CheckArgument(nameof(controllerObject)); if (typeof(C) == typeof(CashCow.Contracts.Persistence.CashCow.ICashEvent)) { controller = new Controllers.Persistance.CashEventController(controllerObject) as IControllerAccess <C>; } }
public static IControllerAccess <T> Create <T>(object sharedController) where T : Contracts.IIdentifiable { IControllerAccess <T> result = null; if (typeof(T) == typeof(Contracts.Persistence.ITravel)) { result = (IControllerAccess <T>)CreateTravelController(sharedController); } else if (typeof(T) == typeof(Contracts.Persistence.IExpense)) { result = (IControllerAccess <T>)CreateExpenseController(sharedController); } return(result); }
static partial void CreateController <C>(IContext context, ref IControllerAccess <C> controller) where C : IIdentifiable { if (typeof(C) == typeof(SmartNQuick.Contracts.Persistence.MusicStore.IGenre)) { controller = new Controllers.Persistence.MusicStore.GenreController(context) as IControllerAccess <C>; } else if (typeof(C) == typeof(SmartNQuick.Contracts.Persistence.MusicStore.IArtist)) { controller = new Controllers.Persistence.MusicStore.ArtistController(context) as IControllerAccess <C>; } else if (typeof(C) == typeof(SmartNQuick.Contracts.Persistence.MusicStore.IAlbum)) { controller = new Controllers.Persistence.MusicStore.AlbumController(context) as IControllerAccess <C>; } }
public static IControllerAccess <T> Create <T>() where T : IIdentifiable { IControllerAccess <T> result = null; if (typeof(T) == typeof(IInvoiceHead)) { //result = new InvoiceHeadController(CreateContext()) as IControllerAccess<T>; result = (IControllerAccess <T>)CreateInvoiceHeadController(); } else if (typeof(T) == typeof(IInvoicePosition)) { //result = new InvoicePositionController(CreateContext()) as IControllerAccess<T>; result = (IControllerAccess <T>)CreateInvoicePositionController(); } return(result); }
public static IControllerAccess <T> Create <T>() where T : Contracts.IIdentifiable { IControllerAccess <T> result = null; if (typeof(T) == typeof(Contracts.Persistence.IBill)) { result = (IControllerAccess <T>)CreateBillController(); } else if (typeof(T) == typeof(Contracts.Persistence.IExpense)) { result = (IControllerAccess <T>)CreateExpenseController(); } else if (typeof(T) == typeof(Contracts.Business.IBillExpense)) { result = (IControllerAccess <T>)CreateBillExpenseController(); } return(result); }
public static IControllerAccess <T> Create <T>(Object controller) where T : Contracts.IIdentifiable { controller.CheckArgument(nameof(controller)); IControllerAccess <T> result = null; if (typeof(T) == typeof(Contracts.Persistence.IBill)) { result = (IControllerAccess <T>)CreateBillController(controller); } else if (typeof(T) == typeof(Contracts.Persistence.IExpense)) { result = (IControllerAccess <T>)CreateExpenseController(controller); } else if (typeof(T) == typeof(Contracts.Business.IBillExpense)) { result = (IControllerAccess <T>)CreateBillExpenseController(controller); } return(result); }
public static IControllerAccess <T> Create <T>(object sharedController) where T : Contracts.IIdentifiable { IControllerAccess <T> result = null; if (typeof(T) == typeof(Contracts.Persistence.IGenre)) { result = (IControllerAccess <T>)CreateGenreController(sharedController); } else if (typeof(T) == typeof(Contracts.Persistence.IArtist)) { result = (IControllerAccess <T>)CreateArtistController(sharedController); } else if (typeof(T) == typeof(Contracts.Persistence.IAlbum)) { result = (IControllerAccess <T>)CreateAlbumController(sharedController); } else if (typeof(T) == typeof(Contracts.Persistence.ITrack)) { result = (IControllerAccess <T>)CreateTrackController(sharedController); } return(result); }