anchor.diff:    do namespaces |> Seq.iter (config.Namespaces.Add >> ignore)
     do config.BaseTemplateType <- typedefof<DocPageTemplateBase<_>>
     do config.Debug <- true 
  -  let templateservice = new MyTemplateService(config)
  +  let razorEngine = RazorEngineService.Create(config)
   
     let handleCompile source f =
       try
  
positive.code:       
    member internal x.HandleCompile source f = handleCompile source f
    member internal x.TemplateName = templateName
    member internal x.TemplateService = templateservice
    member internal x.TemplateResolver = templateResolver
    member internal x.WithProperties properties = withProperties properties x.ViewBag
  
    /// Dynamic object with more properties (?)
    member val ViewBag = new DynamicViewBag() with get, set
  
    member x.ProcessFile(?properties) = x.ProcessFileModel(null, ?properties = properties)
    member x.ProcessFileParse(?properties) = x.ProcessFileParseModel(null, ?properties = properties)
        
    member x.ProcessFileModel(model:obj,?properties) =
      handleCompile templateName (fun _ ->
        if templateservice.Resolve(templateName, model) = null then
            let templateContent = templateResolver.Resolve(templateName)
            templateservice.Compile(templateContent, model.GetType(), templateName)
        templateservice.Run(templateName, model, x.WithProperties properties))
  
    /// Process source file and return result as a string
    member x.ProcessFileParseModel(model:obj, ?properties) = 
      handleCompile templateName (fun _ ->
        templateservice.Parse(templateResolver.Resolve templateName, model, x.WithProperties properties, templateName))
  
  and RazorRender<'model>(layoutRoots, namespaces, templateName, ?references) =
      inherit RazorRender(layoutRoots, namespaces, templateName, modeltype = typeof<'model>, ?references = references)
  
      member x.ProcessFile(model:'model, ?properties) = x.ProcessFileModel(model, ?properties = properties)
      member x.ProcessFileParse(model:'model, ?properties) = x.ProcessFileParseModel(model, ?properties = properties)
  
  and StringDictionary(dict:IDictionary<string, string>) =
    member x.Dictionary = dict
  
negative.code:     inherit GetMemberBinder(name, false)
      let notImpl () = raise <| new NotImplementedException()
      override x.FallbackGetMember(v, sug) = notImpl()
      
  type RazorRender(layoutRoots, namespaces, templateName:string, ?modeltype:System.Type, ?references : string list) =
    let templateName =
      if templateName.EndsWith(".cshtml") then
          templateName.Substring(0, templateName.Length - 7)
      else templateName
    let templateCache = new ConcurrentDictionary<string[] * string, ITemplateSource>()
    // Create resolver & set it to the global static field 
    let templateManager = 
      { new ITemplateManager with
          member x.GetKey (name, resolveType, context) = new NameOnlyTemplateKey(name, resolveType, context) :> ITemplateKey
          member x.AddDynamic (key, source) = failwith "dynamic templates are not supported!"
          member x.Resolve templateKey = 
              let name = templateKey.Name
              let key = Array.ofSeq layoutRoots, name
              templateCache.GetOrAdd (key, fun (layoutRoots, name) -> 
                  let file = RazorRender.Resolve(layoutRoots, name + ".cshtml")
                  new LoadedTemplateSource(File.ReadAllText(file), file) :> ITemplateSource) }
  
    // Configure templating engine
    let config = new TemplateServiceConfiguration()
    do config.EncodedStringFactory <- new RawStringFactory()
    do config.TemplateManager <- templateManager
    do
      match references with
      | Some r -> 
  