Ticket #28 (closed enhancement: fixed)

Opened 4 months ago

Last modified 4 months ago

Create configuration/settings classes

Reported by: louis.dejardin Assigned to:
Priority: major Component: AspNet Mvc ViewEngine
Keywords: Cc:

Description

There are a number of things which should be configurable.

  • release/debug class builds
  • set or override sparkview base class
  • namespaces and assemblies to include

An ideal way to do this would also allow for settings to be passed in when factory is created. It would be even better if this was done in a way that fit well with ioc containers (windsor).

Change History

08/04/08 04:12:08 changed by louis.dejardin

  • status changed from new to closed.
  • resolution set to fixed.
  • component set to AspNet Mvc ViewEngine.

Config added with the following format

<configSections>
  <section name="spark" type="Spark.Configuration.SparkSectionHandler, Spark"/>
</configSections>
<spark>
  <compilation debug="true">
    <assemblies>
      <add assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
    </assemblies>
    <namespaces>
      <add namespace="System"/>
      <add namespace="System.Collections.Generic"/>
      <add namespace="System.Linq"/>
      <add namespace="System.Web.Mvc"/>
    </namespaces>
  </compilation>
</spark>

Or you can build a settings manually to pass to the engine

var settings = new SparkSettings()
    .SetDebug(true)
    .AddNamespace("System")
    .AddNamespace("System.Collections.Generic")
    .AddNamespace("System.Linq")
    .AddAssembly(typeof(TestAttribute).Assembly)
    .AddAssembly("Spark.Tests");

The whole question of windsor config with castle and with mvccontrib is still outstanding.