コード例 #1
0
 /// <summary>
 /// Backwards Compat
 /// </summary>
 /// <param name="razorTemplate"></param>
 /// <param name="model"></param>
 /// <param name="viewBag"></param>
 /// <param name="cacheName"></param>
 /// <returns></returns>
 public string Parse(string razorTemplate, object model, DynamicViewBag viewBag, string cacheName)
 {
     CheckDisposed();
     if (model != null &&
         (CompilerServicesUtility.IsAnonymousType(model.GetType()) || CompilerServicesUtility.IsDynamicType(model.GetType())))
     {
         throw new ArgumentException("Anonymous types are not supported (use the new RazorEngineService/IsolatedRazorEngineService API)");
     }
     return(_proxy.Parse(razorTemplate, model, viewBag, cacheName));
 }