コード例 #1
0
        /// <summary>
        /// Configure the mediator object, based on the configuration element of the mediator.
        /// </summary>
        /// <param name="configuration">The MediatorElement configuration.</param>
        public void Initialize()
        {
            _logger    = TemplatingLogger.GetLogger(this.GetType());
            _config    = RazorMediatorConfigurationSection.GetConfiguration();
            _generator = new RazorTemplateGenerator();

            foreach (NamespaceElement nameSpace in _config.Namespaces)
            {
                _namespaces.Add(nameSpace.Namespace);
            }

            foreach (AssemblyElement assembly in _config.Assemblies)
            {
                _assemblies.Add(assembly.Assembly);
            }
        }
コード例 #2
0
 /// <summary>
 /// Configure the mediator object, based on the configuration element of the mediator.
 /// </summary>
 /// <param name="configuration">The MediatorElement configuration.</param>
 public void Configure(MediatorElement configuration)
 {
     _config = RazorMediatorConfigurationSection.GetConfiguration();
 }