コード例 #1
0
        private void GetCommandMetadataCallback(IPowerShellCommandMetadata result)
        {
            try
            {
                Model = CommandModelFactory.GenerateCommandModel(result);

                if (Model != null)
                {
                    _hostWindow.SetCaption(Model.Name);
                    UpdateCommandPreview();
                    Model.PropertyChanged += OnCommandModelPropertyChanged;
                }
            }
            catch (Exception ex)
            {
                Log.Error("Error while creating command model", ex);
            }
            finally
            {
                IsBusy = false;
            }
        }