Ejemplo n.º 1
0
 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>;
     }
 }
Ejemplo n.º 2
0
        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>;
            }
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
 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>;
     }
 }
Ejemplo n.º 5
0
        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);
        }
Ejemplo n.º 6
0
        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);
        }
Ejemplo n.º 7
0
        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);
        }
Ejemplo n.º 8
0
        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);
        }