public DefaultCommandsEditor(ICommandProvider commandProvider, IFeatureRegistry registry, FeaturedCommandCollection defaults)
        {
            CommandProvider = commandProvider;
            DefaultCommands = registry.RegisteredFeatures.Select((features) => new DefaultCommandItemThing(registry, features, defaults));

            InitializeComponent();
        }
Beispiel #2
0
 /// <summary>
 /// Gets whether a feature path is valid for the features in the registry
 /// </summary>
 /// <param name="registry">Feature registry where the Features property is used to determine if the path is valid</param>
 /// <param name="featurePath">Feature path to the highest-level feature</param>
 /// <returns>Value indicating whether the feature registry contains a valid feature for the given path</returns>
 /// <exception cref="System.ArgumentNullException">Thrown when <paramref name="registry"/> or <paramref name="featurePath"/> is null</exception>
 /// <exception cref="System.InvalidOperationException">Thrown when <paramref name="featurePath"/> is empty</exception>
 public static bool IsEnabled(IFeatureRegistry registry, IEnumerable <string> featurePath)
 {
     Ensure.Argument.NotNull(registry, "registry");
     return(IsEnabled(registry.Features, featurePath));
 }
 public DefaultCommandItemThing(IFeatureRegistry registry, CommandFeatures features, FeaturedCommandCollection defaults)
 {
     this.registry = registry;
     this.features = features;
     this.defaults = defaults;
 }
Beispiel #4
0
 public FeatureConfigurationController(IFeatureRegistry featureRegistry)
 {
     _featureRegistry = featureRegistry;
 }
Beispiel #5
0
 public ProgramPluginContext(CommandRunner commandRunner, IFeatureRegistry featureRegistry, ICommandProvider commandProvider)
 {
     this.commandRunner = commandRunner;
     this.featureRegistry = featureRegistry;
     this.commandProvider = commandProvider;
 }
 /// <summary>
 /// Gets whether a feature path is valid for the features in the registry
 /// </summary>
 /// <param name="registry">Feature registry where the Features property is used to determine if the path is valid</param>
 /// <param name="featurePath">Feature path to the highest-level feature</param>
 /// <returns>Value indicating whether the feature registry contains a valid feature for the given path</returns>
 /// <exception cref="System.ArgumentNullException">Thrown when <paramref name="registry"/> or <paramref name="featurePath"/> is null</exception>
 /// <exception cref="System.InvalidOperationException">Thrown when <paramref name="featurePath"/> is empty</exception>
 public static bool IsEnabled(IFeatureRegistry registry, IEnumerable<string> featurePath)
 {
     Ensure.Argument.NotNull(registry, "registry");
     return IsEnabled(registry.Features, featurePath);
 }
    public SampleTenant(IFeatureRegistry enabledFeatures)
    {
        ApplicationName = "Sample 1";

        EnabledFeatures = enabledFeatures;
    }