/// <summary> /// Instantiates a new process contrext for inversion. /// </summary> /// <remarks>You can think of this type here as "being Inversion". This is the thing.</remarks> /// <param name="underlyingContext">The underlying http context to wrap.</param> /// <param name="services">The service container the context will use.</param> /// <param name="resources">The resources available to the context.</param> public AspNetContext(HttpContext underlyingContext, IServiceContainer services, IResourceAdapter resources) : base(services, resources) { _underlyingContext = underlyingContext; _application = this.UnderlyingContext.ApplicationInstance as AspNetApplication; _response = new AspNetResponse(this.UnderlyingContext.Response); _request = new AspNetRequest(this.UnderlyingContext.Request); }
public ResourceModel(IResourceAdapter adapter) { Id = adapter.Id; StockId = adapter.StockId; Name = adapter.Name; PriceBase = adapter.PriceBase; Price = adapter.Price; }
public Resource(IResourceAdapter adapter) : this() { Id = adapter.Id; Name = adapter.Name; PriceBase = adapter.PriceBase; Price = adapter.Price; StockId = adapter.StockId; }
/// <summary> /// Instantiates a new process contrext for inversion. /// </summary> /// <remarks>You can think of this type here as "being Inversion". This is the thing.</remarks> /// <param name="services">The service container the context will use.</param> /// <param name="resources">The resources available to the context.</param> public ProcessContext(IServiceContainer services, IResourceAdapter resources) { _serviceContainer = services; _resources = resources; _cache = MemoryCache.Default; _bus = new Subject <IEvent>(); _messages = new DataCollection <string>(); _errors = new DataCollection <ErrorMessage>(); _timers = new ProcessTimerDictionary(); _controlState = new DataDictionary <object>(); _flags = new DataCollection <string>(); _steps = new ViewSteps(); _params = new ConcurrentDataDictionary <string>(); }
/// <summary> /// Instantiates a new process contrext for inversion. /// </summary> /// <remarks>You can think of this type here as "being Inversion". This is the thing.</remarks> /// <param name="services">The service container the context will use.</param> /// <param name="resources">The resources available to the context.</param> public MockWebContext(IServiceContainer services, IResourceAdapter resources) : base(services, resources) { this.Request = new MockWebRequest(String.Empty); this.Response = new MockWebResponse(); }
public void Update(IResourceAdapter item) { _db.Entry(new Resource(item)).State = EntityState.Modified; }
public void Create(IResourceAdapter item) { _db.Resources.Add(new Resource(item)); }
public GameManager(RenderAdapter renderAdapter, IUtilsAdapter utilsAdapter, IInputAdapter inputAdapter, IResourceAdapter resoruceAdapter) { _graphics = new GraphicsManager(renderAdapter); Utils.SetAdapter(utilsAdapter); _input = new InputManger(inputAdapter); ResoruceManger.SetAdapter(resoruceAdapter); SetUpGameWindow(); LoadFonts(); _world = new World(_factory, _settings.BackgroundMusicFileName); _ui = new UserInterfaceManger(_factory, _world); Statistics.SetWorld(_world); // Must be called After adapters are set _collsion = new CollsionManger(); _sound = new SoundManger(); }
/// <summary> /// Instantiates a new process contrext for inversion. /// </summary> /// <remarks>You can think of this type here as "being Inversion". This is the thing.</remarks> /// <param name="underlyingContext">The underlying http context to wrap.</param> /// <param name="services">The service container the context will use.</param> /// <param name="resources">The resources available to the context.</param> public OwinProcessContext(IOwinContext underlyingContext, IServiceContainer services, IResourceAdapter resources) : base(services, resources) { _underlyingContext = underlyingContext; _application = null; _response = new OwinResponse(this.UnderlyingContext.Response); _request = new OwinRequest(this.UnderlyingContext.Request); }
public static void SetAdapter(IResourceAdapter adapter) { Adapter = adapter ?? throw new NullReferenceException(); }