protected virtual void RegisterTypes(IUnityContainer container)
        {
            //Standard configuration
            StandardUnityConfig.RegisterStandardFacetFactories(container);
            StandardUnityConfig.RegisterCoreContainerControlledTypes(container);
            StandardUnityConfig.RegisterCorePerTransactionTypes <PerResolveLifetimeManager>(container);

            container.RegisterType <IPrincipal>(new InjectionFactory(c => TestPrincipal));
            var config = new EntityObjectStoreConfiguration();

            //config.UsingEdmxContext("Model").AssociateTypes(AdventureWorksTypes);
            //config.SpecifyTypesNotAssociatedWithAnyContext(() => new[] { typeof(AWDomainObject) });

            container.RegisterInstance <IEntityObjectStoreConfiguration>(config, (new ContainerControlledLifetimeManager()));

            // TODO still done for backward compatibility -
            var reflectorConfig = new ReflectorConfiguration(
                Types ?? new Type[] {},
                MenuServices.Select(s => s.GetType()).ToArray(),
                ContributedActions.Select(s => s.GetType()).ToArray(),
                SystemServices.Select(s => s.GetType()).ToArray(),
                Namespaces ?? new string[] { });

            container.RegisterInstance <IReflectorConfiguration>(reflectorConfig, (new ContainerControlledLifetimeManager()));
            container.RegisterType <ISession>(new PerResolveLifetimeManager(), new InjectionFactory(c => TestSession));
        }
 public CompositionRoot(
     FileSystemWatcherFactory fileSystemWatcherFactory,
     SystemServices systemServices,
     string filters)
 {
     _fileSystemWatcherFactory = fileSystemWatcherFactory;
     _systemServices           = systemServices;
     _filters = filters;
 }
 protected override void InitializeData()
 {
     Messenger.Default.Send(new NotificationMessageAction <Cloud>(Messages.SetCreateServiceData,
                                                                  (cloud) =>
     {
         this.cloud = cloud;
         SystemServices.Synchronize(
             cloud.AvailableServices,
             new SystemServiceEqualityComparer());
     }));
 }
Exemple #4
0
 public TestModuleController(IMapper mapper
                             , UsersSrevices usersSrevices
                             , SystemServices sysservices
                             , DataBaseServices dataBaseServices
                             , AppSystemServices appSystemServices
                             )
 {
     _mapper            = mapper;
     _sysservices       = sysservices;
     _dataBaseServices  = dataBaseServices;
     _appSystemServices = appSystemServices;
 }
 public RequestResponseLogController(IMapper mapper
                                     , UsersSrevices usersSrevices
                                     , SystemServices sysservices
                                     , DataBaseServices dataBaseServices
                                     , AppSystemServices appSystemServices
                                     )
 {
     _mapper            = mapper;
     _sysservices       = sysservices;
     _dataBaseServices  = dataBaseServices;
     _appSystemServices = appSystemServices;
 }
Exemple #6
0
        public App()
        {
            InitializeComponent();

            _SystemServices = new SystemServices
                              (
                authenticationService: (_AuthenticationService = null),
                presentationService: null,
                loginService: new CarryInLoginService(_AuthenticationService)
                              );

            InitializeHomePage();
        }
        public DataBaseConnectionController(IMapper mapper
                                            , UsersSrevices usersSrevices
                                            , SystemServices sysservices
                                            , DataBaseServices dataBaseServices
                                            , AppSystemServices appSystemServices
                                            , IHostingEnvironment hostingEnvironment)

        {
            _mapper             = mapper;
            _sysservices        = sysservices;
            _dataBaseServices   = dataBaseServices;
            _appSystemServices  = appSystemServices;
            _hostingEnvironment = hostingEnvironment;
        }
        public static void Main(string[] args)
        {
            Server server = new Server
            {
                Services = { SystemServices.BindService(new SystemServicesImpl()) },
                Ports    = { new ServerPort("localhost", Port, ServerCredentials.Insecure) }
            };

            server.Start();

            Console.WriteLine("Greeter server listening on port " + Port);
            Console.WriteLine("Press any key to stop the server...");
            Console.ReadKey();

            server.ShutdownAsync().Wait();
        }
Exemple #9
0
        public ArtifactNotificationDriver StartApplication()
        {
            var watchersFactory = Substitute.For <FileSystemWatcherFactory>();

            _presenter          = Substitute.For <ApplicationEventsPresenter>();
            _diagnosticMessages = Substitute.For <DiagnosticMessages>();
            _systemServices     = Substitute.For <SystemServices>();
            _handControlledFileSystemWatcher = new ManuallyTriggerableFileSystemWatcher();

            watchersFactory.CreateFileSystemWatchers(_filters).Returns(_handControlledFileSystemWatcher);

            var compositionRoot = new CompositionRoot(watchersFactory, _systemServices, _filters);

            _useCases = compositionRoot.Compose(_presenter, _diagnosticMessages);
            _useCases.Initialize();
            return(this);
        }
Exemple #10
0
 /// <summary>
 /// 系统服务
 /// </summary>
 /// <param name="systemServices">系统管理访问</param>
 public AccountController(SystemServices systemServices)
 {
     this.systemServices = systemServices;
 }
Exemple #11
0
 public CarryInRegisterService(SystemServices systemServices)
 {
     _SystemServices = systemServices;
 }
Exemple #12
0
 public FakeClipboard(SystemServices systemServices)
 {
     _systemServices = systemServices;
 }
Exemple #13
0
 public FakeClientSideInterface(UseCases useCases, DiagnosticMessages diagnosticMessages, SystemServices systemServices)
 {
     _useCases           = useCases;
     _diagnosticMessages = diagnosticMessages;
     _systemServices     = systemServices;
 }
Exemple #14
0
 public ConcretePathStates(SystemServices systemServices, DiagnosticMessages diagnosticMessages, ApplicationEventsPresenter applicationEventsPresenter)
 {
     _systemServices             = systemServices;
     _diagnosticMessages         = diagnosticMessages;
     _applicationEventsPresenter = applicationEventsPresenter;
 }
Exemple #15
0
 private void LoadSystemsWorker_DoWork(object sender, DoWorkEventArgs e)
 {
     Systems = new List <EELData.System>();
     Systems = SystemServices.GetAllSystems();
 }
Exemple #16
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="systemServices">
 /// 系统服务
 /// </param>
 /// <param name="orgMgtService">机构设置</param>
 public SystemController(SystemServices systemServices)
 {
     this.systemServices = systemServices;
 }
 public FakeFileSystem(SystemServices systemServices, ManuallyTriggerableFileSystemWatcher handControlledFileSystemWatcher)
 {
     _systemServices = systemServices;
     _handControlledFileSystemWatcher = handControlledFileSystemWatcher;
 }
 public PathDetectedState(ChangedPath fullPath, SystemServices systemServices, ApplicationEventsPresenter applicationEventsPresenter)
 {
     _fullPath                   = fullPath;
     _systemServices             = systemServices;
     _applicationEventsPresenter = applicationEventsPresenter;
 }
Exemple #19
0
 public GlobalExceptionFilter(SystemServices sysservices)
 {
     _sysservices = sysservices;
 }