public Bootstrapper( IAppIocContainerProvider[] appIocContainerProviders, //IAppServiceDiscoveryFromCodeMarkup appServiceDiscoveryFromCodeMarkup, //IAppServiceRegistrationInfoExtractor appServiceRegistrationInfoExtractor, //IAppServiceDiscoveryFromRuntimeCollection appServiceDiscoveryFromRuntimeCollection, IServiceRegistry serviceRegistry, AppServiceIocContainerProxy.Holder appIocContainerHolder, IServiceProxyBuilder serviceProxyBuilder, IFabric[] registeredFabrics, ICurrentFabric currentFabricHolder, IServicePublisher[] servicePublishers, IServiceRegistryUpdaterViaDiscovery serviceRegistryUpdaterViaDiscovery) { _appIocContainerProviders = appIocContainerProviders; //_appServiceDiscoveryFromCodeMarkup = appServiceDiscoveryFromCodeMarkup; //_appServiceRegistrationInfoExtractor = appServiceRegistrationInfoExtractor; //_appServiceDiscoveryFromRuntimeCollection = appServiceDiscoveryFromRuntimeCollection; _serviceRegistry = serviceRegistry; _appIocContainerHolder = appIocContainerHolder; _serviceProxyBuilder = serviceProxyBuilder; if (registeredFabrics.Length > 1) { throw new InvalidOperationException("Multi-fabric is not supported."); } if (registeredFabrics.Length == 1) { _fabric = registeredFabrics[0]; ((ICurrentFabricSetter)currentFabricHolder).SetInstance(_fabric); } _servicePublishers = servicePublishers; _serviceRegistryUpdaterViaDiscovery = serviceRegistryUpdaterViaDiscovery; }
public static void Initialize(this IFabric fabric, Context context) { if (_initialized) { return; } lock (InitializeLock) { if (_initialized) { return; } var instance = fabric as Fabric; if (instance == null) { return; } instance.Initialize(context); _initialized = true; } }
/// <summary> /// Initializes a new instance of the <see cref = "AutoMockingContainer{TTargetClass}" /> class. /// </summary> public AutoMockingContainer() { _fabric = FrameworkConfig.BuildFabric(); _mockingEngine = FrameworkConfig.MockingEngine; _serviceLocator = this; _container = new AutoMockedContainer(this); }
private void _anglesNumber_ValueChanged(object sender, EventArgs e) { if (_figure is NanglesFigure) { fabrica = new NanglesIFabric((int)_anglesNumber.Value); _figure = fabrica.CreateFigure(_pen); } }
private void Form1_Load(object sender, EventArgs e) { canvas = new Canvas(pictureBox1.Width, pictureBox1.Height); // _figure = new MyBrush(); _figure = new RectangleFigure(_pen); fabrica = new RectangleIFabric(); figuresList = new List <IFigure>(); }
public MainApplication(IEventHandler eventHandler, IUserSessionHandler userSessionHandler, IFabric <ITravelEvent> eventFabric, IFabric <Travel> travelFabric, ILocationHandler locationHandler, INetworkDataHandler networkDataHandler, IFormatsHandler formatsHandler) { EventHandler = eventHandler; UserSessionHandler = userSessionHandler; EventFabric = eventFabric; TravelFabric = travelFabric; LocationHandler = locationHandler; FormatsHandler = formatsHandler; NetworkDataHandler = networkDataHandler; }
public void SetInstance(IFabric fabric) => Fabric = fabric;
private void IsoscelesTriangle_Click(object sender, EventArgs e) { fabrica = new IsoscelesIFabric(); _figure = new IsoscelesTriangle(_pen); radioButtonPaintMode.Checked = true; }
private void NanglesFigure_Click(object sender, EventArgs e) { // _figure = new NanglesFigure((int)_anglesNumber.Value); fabrica = new NanglesIFabric((int)_anglesNumber.Value); _figure = fabrica.CreateFigure(_pen); }
private void Ellipse_Click(object sender, EventArgs e) { fabrica = new EllipseIFabric(); _figure = new EllipseFigure(_pen); radioButtonPaintMode.Checked = true; }
private void FigureND_Click(object sender, EventArgs e) { fabrica = new FigureNDIFabric(); _figure = fabrica.CreateFigure(_pen); radioButtonPaintMode.Checked = true; }
private void Rectangle_2d_Click(object sender, EventArgs e) { fabrica = new RectangleIFabric(); _figure = new RectangleFigure(_pen); radioButtonPaintMode.Checked = true; }
public void ChangeFabric(IFabric fabric) { Fabric = fabric; RenewFigure(); }
public JsonSerialization(IFabric <ITravelEvent> eventFabric) { this.eventFabric = eventFabric; }