Exemplo n.º 1
0
 public ReportsController(AttendenceService attendenceService, ReportService reportService)
 {
     this.attendenceService = attendenceService;
     this.reportService     = reportService;
     this.context           = BeanContext.GetInstance();
     //this.objReportService.CurrentKey = CurrentRequestKey;
 }
Exemplo n.º 2
0
        public void LoadData()
        {
            BeanContext context        = BeanContext.GetInstance();
            Object      ObjectInstance = null;
            Object      Data           = null;
            List <Type> Accessors      = context.GetAccessorTypes();

            foreach (Type Accessor in Accessors)
            {
                if (!Accessor.IsInterface)
                {
                    ObjectInstance = null;
                    Data           = null;
                    MethodInfo Method = Accessor.GetMethod("LoadData");
                    ObjectInstance = context.GetBean(Accessor);
                    Data           = Method.Invoke(ObjectInstance, null);
                    if (Data != null)
                    {
                        PropertyInfo propertyInfo = Accessor.GetProperty("KeyName");
                        Object       KeyName      = propertyInfo.GetValue(ObjectInstance);
                        if (KeyName != null)
                        {
                            this.Put(KeyName.ToString(), Data);
                        }
                    }
                }
            }
        }
Exemplo n.º 3
0
 private DiQueue()
 {
     context             = BeanContext.GetInstance();
     ScopeObjectList     = new ConcurrentDictionary <string, List <InjectionObjects> >();
     SingletonObjectList = new List <InjectionObjects>();
     ScopedClassList     = new List <string>();
 }
Exemplo n.º 4
0
 private BeanContext GetAnnotationContextObject()
 {
     if (context == null)
     {
         context = BeanContext.GetInstance();
     }
     return(context);
 }
Exemplo n.º 5
0
 public QuickRegistrationController(RegistrationService registrationService,
                                    IHttpContextAccessor httpContext,
                                    AuthenticationService authenticationService)
 {
     this.registrationService   = registrationService;
     this.authenticationService = authenticationService;
     this.httpContext           = httpContext.HttpContext;
     this.context = BeanContext.GetInstance();
 }
Exemplo n.º 6
0
 public RegistrationService(IDb db, UserDetail userDetail, ValidateModalService validateModalService, FileService fileService, CurrentSession currentSession)
 {
     this.db                   = db;
     this.beanContext          = BeanContext.GetInstance();
     this.userDetail           = userDetail;
     this.currentSession       = currentSession;
     this.fileService          = fileService;
     this.validateModalService = validateModalService;
     this.userDetail           = currentSession.CurrentUserDetail;
 }
 public object CreateController(ControllerContext context)
 {
     try
     {
         BeanContext beanContext = BeanContext.GetInstance();
         Type        ClassType   = context.ActionDescriptor.ControllerTypeInfo.AsType();
         Object      NewInstance = beanContext.GetBean(ClassType, context.HttpContext);
         return(NewInstance);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemplo n.º 8
0
        public Startup(IConfiguration configuration, IWebHostEnvironment env)
        {
            Configuration = configuration;
            try
            {
                var config = new ConfigurationBuilder()
                             .SetBasePath(env.ContentRootPath)
                             .AddJsonFile("appsettings.json", optional: false, reloadOnChange: false);
                //AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: false, reloadOnChange: false);

                this.Configuration = config.Build();

                context = BeanContext
                          .GetInstance()
                          .Load();

                context.SetApplicationDetail(env.ApplicationName, env.ContentRootPath, env.EnvironmentName);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
 public RequestHandler()
 {
     beanContext = BeanContext.GetInstance();
 }
 public SellGoodsController(SellGoodService sellGoodService, AccountService accountService)
 {
     this.sellGoodService = sellGoodService;
     this.accountService  = accountService;
     this.context         = BeanContext.GetInstance();
 }
Exemplo n.º 11
0
 public FileService()
 {
     this.beanContext = BeanContext.GetInstance();
 }
Exemplo n.º 12
0
 public ValidateModal()
 {
     context = BeanContext.GetInstance();
     this.ObjServiceResult = new ServiceResult();
 }
Exemplo n.º 13
0
 public GoodsReportController(GoodsItemService objGoodsItemService, VendorService ObjVendorService, Vendor ObjGoods)
 {
     this.ObjVendorService    = ObjVendorService;
     this.objGoodsItemService = objGoodsItemService;
     this.context             = BeanContext.GetInstance();
 }
Exemplo n.º 14
0
 public CurrentUserObject()
 {
     beanContext = BeanContext.GetInstance();
 }
 public TableAutoMapper()
 {
     context = BeanContext.GetInstance();
 }
 public ValidateModalService(ServiceResult serviceResult)
 {
     context            = BeanContext.GetInstance();
     this.serviceResult = serviceResult;
 }
Exemplo n.º 17
0
 public DbActionController()
 {
     this.context = BeanContext.GetInstance();
 }