public ActionResult Image(string location, string id) { Response.Cache.SetOmitVaryStar(true); IContractFactory <IResourceAccess> builder = Actor.Public.GetNamedExport <IContractFactory <IResourceAccess> >(location); if (builder.IsNull()) { return(Content("no resource")); } return(File(builder.Build().GetImage(id), "image/png")); }
public ActionResult Script(string location, string id) { Response.Cache.SetOmitVaryStar(true); IContractFactory <IResourceAccess> builder = Actor.Public.GetNamedExport <IContractFactory <IResourceAccess> >(location); if (builder.IsNull()) { return(Content("no resource")); } return(Content(builder.Build().GetScript(id), "text/javascript")); }
public static IEntityRequestProcess BuildEntityProcessor(this Public Public, string ProviderName) { Lazy <IContractFactory <IEntityRequestProcess> > factoryLazy = _founderAgent.EntityProcessorBox.FirstOrDefault(f => f.Metadata.ProviderName.Equals(ProviderName, StringComparison.InvariantCultureIgnoreCase)); IContractFactory <IEntityRequestProcess> factory = factoryLazy.Value; if (factory != default(IContractFactory <IEntityRequestProcess>)) { return(factory.Build()); } return(default(IEntityRequestProcess)); }
public static T BuildContractProvider <T>(this Public Public) where T : class { object obj = default(IContractFactory <T>); if (MEFPool.TryGetValue(typeof(IContractFactory <T>), out obj) && obj is IContractFactory <T> ) { IContractFactory <T> builder = obj as IContractFactory <T>; return(builder.Build().AsDecorator()); } return(default(T)); }
public FestiTimerContext( DbContextOptions options, IEmployerFactory employerFactory, IPersonFactory personFactory, IContractFactory contractFactory, IWorkscheduleFactory workscheduleFactory, IJobFactory jobFactory, IWorkshiftFactory workshiftFactory) : base(options) { EmployerFactory = employerFactory; PersonFactory = personFactory; ContractFactory = contractFactory; WorkscheduleFactory = workscheduleFactory; JobFactory = jobFactory; WorkshiftFactory = workshiftFactory; Database.EnsureCreated(); }
public Billing(IBillableExchange phoneExchange, IContractFactory contractFactory, ISubscriberFactory subscriberFactory, IDateTimeHelper dtHelper = null) { if (phoneExchange == null) { throw new ArgumentNullException("phoneExchange", "phoneExchange cannot be null."); } _dtHelper = dtHelper ?? new DefaultDateTimeHelper(); _dtHelper.DayIntervalChanged += BillingDayIntervalChanged; _phoneExchange = phoneExchange; _contractFactory = contractFactory; _subscriberFactory = subscriberFactory; _phoneExchange.CallLog += BillingCallLog; _phoneExchange.CallPermissionCheck += BillingCallPermissionCheck; _timer = new Timer(_dtHelper.DayInterval); _timer.AutoReset = true; _timer.Elapsed += DailyTask; _timer.Start(); }
public ContractService(IContractRepository contractRepository, IContractFactory contractFactory, IWorkscheduleFactory workscheduleFactory) { _contractRepository = contractRepository; _contractFactory = contractFactory; _workscheduleFactory = workscheduleFactory; }
public ContractRegistry(IContractFactory factory) { _factory = factory; }