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

            InitializeComponent();
        }
Exemplo n.º 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));
 }
Exemplo n.º 3
0
 public DefaultCommandItemThing(IFeatureRegistry registry, CommandFeatures features, FeaturedCommandCollection defaults)
 {
     this.registry = registry;
     this.features = features;
     this.defaults = defaults;
 }
Exemplo n.º 4
0
 public FeatureConfigurationController(IFeatureRegistry featureRegistry)
 {
     _featureRegistry = featureRegistry;
 }
Exemplo n.º 5
0
 public ProgramPluginContext(CommandRunner commandRunner, IFeatureRegistry featureRegistry, ICommandProvider commandProvider)
 {
     this.commandRunner = commandRunner;
     this.featureRegistry = featureRegistry;
     this.commandProvider = commandProvider;
 }
Exemplo n.º 6
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);
 }
Exemplo n.º 7
0
    public SampleTenant(IFeatureRegistry enabledFeatures)
    {
        ApplicationName = "Sample 1";

        EnabledFeatures = enabledFeatures;
    }