Пример #1
0
        /// <summary>
        /// Imports the configuration from another registry into this registry.
        /// </summary>
        /// <param name="registry"></param>
        public void IncludeRegistry(Registry registry)
        {
            var pluginGraphConfiguration = registry.As <IPluginGraphConfiguration>();

            alter    = pluginGraphConfiguration.Configure;
            register = pluginGraphConfiguration.Register;
        }
Пример #2
0
        /// <summary>
        /// An alternative way to use CreateProfile that uses ProfileExpression
        /// as a Nested Closure.  This usage will result in cleaner code for
        /// multiple declarations
        /// </summary>
        /// <param name="profileName"></param>
        /// <param name="action"></param>
        public void Profile(string profileName, Action <IProfileRegistry> action)
        {
            var registry = new Registry();

            action(registry);

            alter = x => registry.As <IPluginGraphConfiguration>().Configure(x.Profile(profileName));
        }
Пример #3
0
 /// <summary>
 /// Imports the configuration from another registry into this registry.
 /// </summary>
 /// <param name="registry"></param>
 public void IncludeRegistry(Registry registry)
 {
     alter = graph => {
         registry.As <IPluginGraphConfiguration>().Configure(graph);
     };
 }