Exemplo n.º 1
0
        public CommandMethod(MethodInfo info, IMethodService methodService = null)
        {
            _methodService = methodService ?? new MethodService();

            Info = info;
            Name = _methodService.GetCommandName(Info);
        }
Exemplo n.º 2
0
 public CommandService(IParameterService parameterService = null,
                       IMethodService methodService       = null,
                       IConsoleService consoleService     = null,
                       ISettings settings = null)
 {
     _parameterService = parameterService ?? new ParameterService();
     _methodService    = methodService ?? new MethodService();
     _consoleService   = consoleService ?? new ConsoleService();
     _settings         = settings ?? new Settings();
 }
        //private readonly IValidator<CreateMethodRequestDto> _createMethodRequestDtoValidator;
        //private readonly IValidator<UpdateMethodRequestDto> _updateMethodRequestDtoValidator;

        public MethodsController(
            IMethodService methodService,
            //IValidator<CreateMethodRequestDto> createMethodRequestDto,
            //IValidator<UpdateMethodRequestDto> updateMethodRequestDto,
            IMapper mapper) : base(mapper)
        {
            _methodService = methodService;
            //_createMethodRequestDtoValidator = createMethodRequestDto;
            //_updateMethodRequestDtoValidator = updateMethodRequestDto;
        }
 public ProtocolMethodOverviewViewModel(ProtocolMethodOverviewPage protocolPage)
 {
     IsBusy = true;
     OnPropertyChanged(nameof(IsBusy));
     Title = "Methodenübersicht";
     createMethodCommand        = new Command(o => CreateMethod());
     this.protocolPage          = protocolPage;
     this.protocolMethodService = new ProtocolMethodService();
     this.protocolService       = new ProtocolService();
     this.methodService         = new MethodService();
     RefreshList();
 }
Exemplo n.º 5
0
        public static void TestAOP()
        {
            IMyContainerV2 container = new MyContainerV2();

            container.AddTransient <IMethodService, MethodService>();
            container.AddTransient <IPropertyService, PropertyService>();

            IMethodService   m = container.Resolve <IMethodService>();   // EProxy
            IPropertyService p = container.Resolve <IPropertyService>(); // FProxy

            m.Show();
            Console.WriteLine();
            p.Show();
        }
Exemplo n.º 6
0
        public static void RunInterface()
        {
            ProxyGenerator       generator   = new ProxyGenerator();
            MyExampleInterceptor interceptor = new MyExampleInterceptor();

            IMyContainerV2 container = new MyContainerV2();

            container.AddTransient <IMethodService, MethodService>();
            IMethodService service = container.Resolve <IMethodService>();

            service.Show();

            Console.WriteLine();

            var proxy = generator.CreateInterfaceProxyWithTarget(service, interceptor);

            proxy.Show();
        }
        public CreateProtocolMethodViewModel(CreateProtocolMethodPage createProtocolMethodPage)
        {
            Title = "Methode durchführen";
            this.createProtocolMethodPage = createProtocolMethodPage;
            this.methodService            = new MethodService();
            this.protocolService          = new ProtocolMethodService();
            this.teamService = new TeamService();
            imageCommand     = new Command(o => OpenImage());
            safeCommand      = new Command(o => SafeMethod());
            rooms            = new ObservableCollection <string>();
            rooms.Add("Problem");
            rooms.Add("Lösung");
            rooms.Add("Implementierung");
            thinkingTypes = new ObservableCollection <string>();
            thinkingTypes.Add("Divergent");
            thinkingTypes.Add("Konvergent");

            methods = new ObservableCollection <Method>(methodService.GetAll());
        }
Exemplo n.º 8
0
        /// <summary>
        /// Инициализирует сервисы.
        /// </summary>
        /// <param name="method_service">Сервис для работы и хранения методов.</param>
        /// <param name="assembly_service">Сервис для работы с библиотеками C#.</param>
        /// <param name="coordination_service">Сервис координации.</param>
        /// <param name="data_service">Сервис хранения данных.</param>
        /// <param name="web_server_service"></param>
        public InvokeServiceFactory(IMethodService method_service, IAssemblyService assembly_service, ICoordinationService coordination_service,
                                    IDataService <DataInvoke> data_service, IWebServerService web_server_service, RemoteInvokeService remote_invoke_service)
        {
            _methodService       = method_service;
            _assemblyService     = assembly_service;
            _coordinationService = coordination_service;
            _webServerService    = web_server_service;

            _remoteInvokeService = remote_invoke_service;            // new RemoteInvokeService(_coordinationService, _webServerService);
            var invoke_c_sharp_method  = new InvokeCSharpService(_assemblyService, _methodService, data_service);
            var invoke_executable_file = new InvokeExecutableFileService(new ExecutableFileMethodService(), data_service);

            _serviceDictionary = new Dictionary <Type, IInvokeService>
            {
                /*{typeof(RemoteInvokeService), remote_invoke_service},
                *  {typeof(InvokeCSharpService), invoke_c_sharp_method},*/
                { typeof(CSharpMethod), invoke_c_sharp_method },
                { typeof(ExecutableFileMethod), invoke_executable_file }
            };
        }
Exemplo n.º 9
0
 public MethodController(IMethodService _service)
 {
     _methodService = _service;
 }
Exemplo n.º 10
0
 public MethodController(IMethodService _service)
 {
     _methodService = _service;
 }
Exemplo n.º 11
0
 public MethodController(IMethodService methodService, IMapper mapper)
 {
     _methodService = methodService;
     _mapper        = mapper;
 }
Exemplo n.º 12
0
 public void InitA2(IMethodService mService)
 {
     MService = mService;
 }