Esempio n. 1
0
        /// <summary>
        /// Function to retrieve a plug in list item view model based on the plug in passed in.
        /// </summary>
        /// <param name="plugin">The plug in to retrieve data from.</param>
        /// <returns>The view model.</returns>
        private ISettingsPlugInListItem GetPlugInListItem(EditorPlugIn plugin)
        {
            var result = new SettingsPlugInListItem();

            result.Initialize(new SettingsPlugInListItemParameters(plugin, _viewModelInjection));
            return(result);
        }
Esempio n. 2
0
        /// <summary>Initializes a new instance of the <see cref="SettingsPlugInListItemParameters"/> class.</summary>
        /// <param name="plugin">The plugin to evaluate.</param>
        /// <param name="commonServices">Common application services.</param>
        /// <exception cref="ArgumentNullException">Thrown when the <paramref name="plugin"/> is parameter <b>null</b>.</exception>
        public SettingsPlugInListItemParameters(EditorPlugIn plugin, IViewModelInjection commonServices)
            : base(commonServices)
        {
            if (plugin == null)
            {
                throw new ArgumentNullException(nameof(plugin));
            }

            Name           = string.IsNullOrWhiteSpace(plugin.Description) ? plugin.Name : plugin.Description;
            Type           = plugin.PlugInType;
            State          = Resources.GOREDIT_PLUGIN_STATE_LOADED;
            DisabledReason = string.Empty;
            Path           = plugin.PlugInPath;
        }