ALE.Views.Razor.RazorView.Render C# (CSharp) Method

Render() public method

public Render ( string view, object model, string>.Action callback ) : void
view string
model object
callback string>.Action
return void
        public void Render(string view, object model, Action<Exception, string> callback)
        {
            LoadView(view, (ex, viewtext) =>
                               {
                                   if (ex != null)
                                   {
                                       EventLoop.Pend(() => callback(ex, null));
                                   }
                                   try
                                   {
                                       var result = RazorEngine.Razor.Parse(viewtext, model);
                                       EventLoop.Pend(() => callback(null, result));
                                   } catch (Exception ex2)
                                   {
                                       EventLoop.Pend(() => callback(ex2, null));
                                   }
                               });
        }