コード例 #1
0
 private async Task InitializeAsync()
 {
     _lazySettings        = new AsyncLazy <ISettings>(ServiceLocator.GetInstanceAsync <ISettings>, ThreadHelper.JoinableTaskFactory);
     _lazySolutionManager = new AsyncLazy <IVsSolutionManager>(ServiceLocator.GetInstanceAsync <IVsSolutionManager>, ThreadHelper.JoinableTaskFactory);
     _projectManagerServiceSharedState = new NuGetProjectManagerServiceState();
     _sharedServiceState = await SharedServiceState.CreateAsync(CancellationToken.None);
 }
コード例 #2
0
        private Task InitializeAsync()
        {
            _lazySettings        = new AsyncLazy <ISettings>(ServiceLocator.GetInstanceAsync <ISettings>, ThreadHelper.JoinableTaskFactory);
            _lazySolutionManager = new AsyncLazy <IVsSolutionManager>(ServiceLocator.GetInstanceAsync <IVsSolutionManager>, ThreadHelper.JoinableTaskFactory);
            _projectManagerServiceSharedState = new NuGetProjectManagerServiceState();
            _sharedServiceState = new SharedServiceState();

            return(Task.CompletedTask);
        }
コード例 #3
0
        public NuGetProjectManagerService(
            ServiceActivationOptions options,
            IServiceBroker serviceBroker,
            AuthorizationServiceClient authorizationServiceClient,
            INuGetProjectManagerServiceState state,
            ISharedServiceState sharedServiceState)
        {
            Assumes.NotNull(serviceBroker);
            Assumes.NotNull(authorizationServiceClient);
            Assumes.NotNull(state);
            Assumes.NotNull(sharedServiceState);

            _options       = options;
            _serviceBroker = serviceBroker;
            _authorizationServiceClient = authorizationServiceClient;
            _state       = state;
            _sharedState = sharedServiceState;
        }