Ejemplo n.º 1
0
 public static Contracts.Client.IControllerAccess <I> Create <I>() where I : Contracts.IIdentifiable
 {
     Contracts.Client.IControllerAccess <I> result = null;
     if (typeof(I) == typeof(QuickNSmart.Contracts.Persistence.Account.ILoginSession))
     {
         result = new Controllers.Persistence.Account.LoginSessionController(CreateContext()) as Contracts.Client.IControllerAccess <I>;
     }
     else if (typeof(I) == typeof(QuickNSmart.Contracts.Persistence.Account.IRole))
     {
         result = new Controllers.Persistence.Account.RoleController(CreateContext()) as Contracts.Client.IControllerAccess <I>;
     }
     else if (typeof(I) == typeof(QuickNSmart.Contracts.Persistence.Account.IUser))
     {
         result = new Controllers.Persistence.Account.UserController(CreateContext()) as Contracts.Client.IControllerAccess <I>;
     }
     else if (typeof(I) == typeof(QuickNSmart.Contracts.Persistence.Account.IUserXRole))
     {
         result = new Controllers.Persistence.Account.UserXRoleController(CreateContext()) as Contracts.Client.IControllerAccess <I>;
     }
     else if (typeof(I) == typeof(QuickNSmart.Contracts.Business.Account.ILoginUser))
     {
         result = new Controllers.Business.Account.LoginUserController(CreateContext()) as Contracts.Client.IControllerAccess <I>;
     }
     return(result);
 }
Ejemplo n.º 2
0
 public static Contracts.Client.IControllerAccess <I> Create <I>(string sessionToken) where I : Contracts.IIdentifiable
 {
     Contracts.Client.IControllerAccess <I> result = null;
     if (typeof(I) == typeof(QnSContactManager.Contracts.Persistence.App.IContact))
     {
         result = new Controllers.Persistence.App.ContactController(CreateContext())
         {
             SessionToken = sessionToken
         }
         as Contracts.Client.IControllerAccess <I>;
     }
     else if (typeof(I) == typeof(QnSContactManager.Contracts.Persistence.Account.IRole))
     {
         result = new Controllers.Persistence.Account.RoleController(CreateContext())
         {
             SessionToken = sessionToken
         }
         as Contracts.Client.IControllerAccess <I>;
     }
     else if (typeof(I) == typeof(QnSContactManager.Contracts.Business.Account.IAppAccess))
     {
         result = new Controllers.Business.Account.AppAccessController(CreateContext())
         {
             SessionToken = sessionToken
         }
         as Contracts.Client.IControllerAccess <I>;
     }
     return(result);
 }
Ejemplo n.º 3
0
        public static Contracts.Client.IControllerAccess <I> Create <I>() where I : Contracts.IIdentifiable
        {
            Contracts.Client.IControllerAccess <I> result = null;
            if (typeof(I) == typeof(Labelix.Contracts.Persistence.IImage))
            {
                result = new Controllers.Persistence.ImageController(CreateContext()) as Contracts.Client.IControllerAccess <I>;
            }
            else if (typeof(I) == typeof(Labelix.Contracts.Persistence.ILabel))
            {
                result = new Controllers.Persistence.LabelController(CreateContext()) as Contracts.Client.IControllerAccess <I>;
            }
            else if (typeof(I) == typeof(Labelix.Contracts.Persistence.IProject))
            {
                result = new Controllers.Persistence.ProjectController(CreateContext()) as Contracts.Client.IControllerAccess <I>;
            }
            else if (typeof(I) == typeof(Labelix.Contracts.Persistence.IAIModelConfig))
            {
                result = new Controllers.Persistence.AIModelConfigController(CreateContext()) as Contracts.Client.IControllerAccess <I>;
            }
            else if (typeof(I) == typeof(Labelix.Contracts.Persistence.IProject_AIModelConfig))
            {
                result = new Controllers.Persistence.Project_AIModelConfigController(CreateContext()) as Contracts.Client.IControllerAccess <I>;
            }

            return(result);
        }
Ejemplo n.º 4
0
 public static Contracts.Client.IControllerAccess <I> Create <I>() where I : Contracts.IIdentifiable
 {
     Contracts.Client.IControllerAccess <I> result = null;
     if (typeof(I) == typeof(QuickNSmart.Contracts.Persistence.TestOneToMany.IInvoice))
     {
         result = new Controllers.Persistence.TestOneToMany.InvoiceController(CreateContext()) as Contracts.Client.IControllerAccess <I>;
     }
     else if (typeof(I) == typeof(QuickNSmart.Contracts.Persistence.TestOneToMany.IInvoiceDetail))
     {
         result = new Controllers.Persistence.TestOneToMany.InvoiceDetailController(CreateContext()) as Contracts.Client.IControllerAccess <I>;
     }
     else if (typeof(I) == typeof(QuickNSmart.Contracts.Persistence.Account.IRole))
     {
         result = new Controllers.Persistence.Account.RoleController(CreateContext()) as Contracts.Client.IControllerAccess <I>;
     }
     else if (typeof(I) == typeof(QuickNSmart.Contracts.Persistence.Account.IUser))
     {
         result = new Controllers.Persistence.Account.UserController(CreateContext()) as Contracts.Client.IControllerAccess <I>;
     }
     else if (typeof(I) == typeof(QuickNSmart.Contracts.Business.TestOneToMany.IInvoiceDetails))
     {
         result = new Controllers.Business.TestOneToMany.InvoiceDetailsController(CreateContext()) as Contracts.Client.IControllerAccess <I>;
     }
     else if (typeof(I) == typeof(QuickNSmart.Contracts.Business.Account.IAppAccess))
     {
         result = new Controllers.Business.Account.AppAccessController(CreateContext()) as Contracts.Client.IControllerAccess <I>;
     }
     else if (typeof(I) == typeof(QuickNSmart.Contracts.Business.Account.IIdentityUser))
     {
         result = new Controllers.Business.Account.IdentityUserController(CreateContext()) as Contracts.Client.IControllerAccess <I>;
     }
     return(result);
 }
Ejemplo n.º 5
0
 public static Contracts.Client.IControllerAccess <I> Create <I>() where I : Contracts.IIdentifiable
 {
     Contracts.Client.IControllerAccess <I> result = null;
     if (typeof(I) == typeof(QnSTravelCount.Contracts.Business.App.ITravelExpenses))
     {
         result = new Controllers.Business.App.TravelExpensesController(CreateContext()) as Contracts.Client.IControllerAccess <I>;
     }
     return(result);
 }
Ejemplo n.º 6
0
 public static Contracts.Client.IControllerAccess <I> Create <I>(object sharedController) where I : Contracts.IIdentifiable
 {
     Contracts.Client.IControllerAccess <I> result = null;
     if (typeof(I) == typeof(QnSContactManager.Contracts.Persistence.App.IContact))
     {
         result = new Controllers.Persistence.App.ContactController(sharedController as Controllers.ControllerObject) as Contracts.Client.IControllerAccess <I>;
     }
     else if (typeof(I) == typeof(QnSContactManager.Contracts.Persistence.Account.IRole))
     {
         result = new Controllers.Persistence.Account.RoleController(sharedController as Controllers.ControllerObject) as Contracts.Client.IControllerAccess <I>;
     }
     else if (typeof(I) == typeof(QnSContactManager.Contracts.Business.Account.IAppAccess))
     {
         result = new Controllers.Business.Account.AppAccessController(sharedController as Controllers.ControllerObject) as Contracts.Client.IControllerAccess <I>;
     }
     return(result);
 }
Ejemplo n.º 7
0
        protected virtual void Dispose(bool disposing)
        {
            if (!disposedValue)
            {
                if (disposing)
                {
                    // TODO: dispose managed state (managed objects)
                    if (Controller != null)
                    {
                        Controller.Dispose();
                    }
                    Controller = null;
                }

                // TODO: free unmanaged resources (unmanaged objects) and override finalizer
                // TODO: set large fields to null
                disposedValue = true;
            }
        }
 public static Contracts.Client.IControllerAccess <I> Create <I>() where I : Contracts.IIdentifiable
 {
     Contracts.Client.IControllerAccess <I> result = null;
     if (typeof(I) == typeof(QnSHolidayCalendar.Contracts.Persistence.App.ICalendarEntry))
     {
         result = new Controllers.Persistence.App.CalendarEntryController(CreateContext()) as Contracts.Client.IControllerAccess <I>;
     }
     else if (typeof(I) == typeof(QnSHolidayCalendar.Contracts.Persistence.Account.IRole))
     {
         result = new Controllers.Persistence.Account.RoleController(CreateContext()) as Contracts.Client.IControllerAccess <I>;
     }
     else if (typeof(I) == typeof(QnSHolidayCalendar.Contracts.Business.App.IHolidayEntry))
     {
         result = new Controllers.Business.App.HolidayEntryController(CreateContext()) as Contracts.Client.IControllerAccess <I>;
     }
     else if (typeof(I) == typeof(QnSHolidayCalendar.Contracts.Business.Account.IAppAccess))
     {
         result = new Controllers.Business.Account.AppAccessController(CreateContext()) as Contracts.Client.IControllerAccess <I>;
     }
     return(result);
 }
Ejemplo n.º 9
0
 public static Contracts.Client.IControllerAccess <I> Create <I>(object sharedController) where I : Contracts.IIdentifiable
 {
     Contracts.Client.IControllerAccess <I> result = null;
     if (typeof(I) == typeof(QnSBillShare.Contracts.Persistence.App.IBill))
     {
         result = new Controllers.Persistence.App.BillController(sharedController as Controllers.ControllerObject) as Contracts.Client.IControllerAccess <I>;
     }
     else if (typeof(I) == typeof(QnSBillShare.Contracts.Persistence.App.IExpense))
     {
         result = new Controllers.Persistence.App.ExpenseController(sharedController as Controllers.ControllerObject) as Contracts.Client.IControllerAccess <I>;
     }
     else if (typeof(I) == typeof(QnSBillShare.Contracts.Persistence.Account.ILoginSession))
     {
         result = new Controllers.Persistence.Account.LoginSessionController(sharedController as Controllers.ControllerObject) as Contracts.Client.IControllerAccess <I>;
     }
     else if (typeof(I) == typeof(QnSBillShare.Contracts.Persistence.Account.IRole))
     {
         result = new Controllers.Persistence.Account.RoleController(sharedController as Controllers.ControllerObject) as Contracts.Client.IControllerAccess <I>;
     }
     else if (typeof(I) == typeof(QnSBillShare.Contracts.Persistence.Account.IUser))
     {
         result = new Controllers.Persistence.Account.UserController(sharedController as Controllers.ControllerObject) as Contracts.Client.IControllerAccess <I>;
     }
     else if (typeof(I) == typeof(QnSBillShare.Contracts.Persistence.Account.IUserXRole))
     {
         result = new Controllers.Persistence.Account.UserXRoleController(sharedController as Controllers.ControllerObject) as Contracts.Client.IControllerAccess <I>;
     }
     else if (typeof(I) == typeof(QnSBillShare.Contracts.Business.App.IBillExpenses))
     {
         result = new Controllers.Business.App.BillExpensesController(sharedController as Controllers.ControllerObject) as Contracts.Client.IControllerAccess <I>;
     }
     else if (typeof(I) == typeof(QnSBillShare.Contracts.Business.Account.ILoginUser))
     {
         result = new Controllers.Business.Account.LoginUserController(sharedController as Controllers.ControllerObject) as Contracts.Client.IControllerAccess <I>;
     }
     return(result);
 }
 public GenericControllerAdapter(string sessionToken)
 {
     Constructing();
     controller = Logic.Factory.Create <TContract>(sessionToken);
     Constructed();
 }
 public GenericControllerAdapter()
 {
     Constructing();
     controller = Logic.Factory.Create <TContract>();
     Constructed();
 }
 public GenericControllerAdapter()
 {
     controller = Logic.Factory.Create <TContract>();
 }
Ejemplo n.º 13
0
 public GenericController()
 {
     Controller = Logic.Factory.Create <I>();
 }
Ejemplo n.º 14
0
 public void Dispose()
 {
     controller?.Dispose();
     controller = null;
 }