コード例 #1
0
ファイル: Kernel.cs プロジェクト: zaitsman/MockingKernel
        public void Initialize()
        {
            this.InitializeMappings();
            this.InitializeConfiguration();

            this.state = KernelState.initialized;
        }
コード例 #2
0
        public void PublishStatus(Message request, PublisherSocket ioPub, KernelState statusValue)
        {
            Message message = new Message(MessageType.Status, new StatusContent(statusValue), request.Header);

            this._logger.LogInformation(string.Format("Sending message to IOPub {0}", JsonConvert.SerializeObject(message)));
            ioPub.SendMessage(message);
            this._logger.LogInformation("Message Sent");
        }
コード例 #3
0
        private Task SetNewStateAsync(KernelState newState)
        {
            Log.Info($"Kernel state changed from {State} to {newState}");

            State = newState;
            
            _messageHub.SendMessage(new KernelStateChangedMessage(newState));
            
            return Task.CompletedTask;
        }
コード例 #4
0
ファイル: Kernel.cs プロジェクト: zaitsman/MockingKernel
        public Kernel(Configuration.ICoreConfiguration configuration, Communication.ICoreService service)
        {
            if (configuration == null)
            {
                throw new ArgumentException("configuration object must be provided", "configuration");
            }


            this.state = KernelState.initializing;

            this.configuration = configuration;
            this.service       = service ?? this;

            this.backends = new Dictionary <Core.Identity.DomainIdentity, Backend.Infrastructure.IBackend>();
            this.observableUserIdentities = new ObservableCollection <Identity.UserIdentity>();
        }
コード例 #5
0
 public StatusContent(KernelState state)
 {
     ExecutionState = state;
 }
コード例 #6
0
 public KernelStateChangedMessage(KernelState newState)
 {
     NewState = newState;
 }