This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [HttpPost] | |
| public string FetchCompletions(RazorCode model) | |
| { | |
| var host = new System.Web.Razor.RazorEngineHost(new CSharpRazorCodeLanguage()); | |
| var templateEngine = new System.Web.Razor.RazorTemplateEngine(host); | |
| var compiledCode = templateEngine.GenerateCode(new StringReader(model.Code)); | |
| var parsed = templateEngine.ParseTemplate(new StringReader(model.Code)); | |
| // Cannot convert from 'System.Web.Razor.Parser.SyntaxTree.Block' to 'Microsoft.CodeAnalysis.Document' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class TypeWrapper | |
| { | |
| private readonly dynamic dyn; | |
| private readonly Dictionary<string, CallSite<Action<CallSite, object, object>>> setters | |
| = new Dictionary<string, CallSite<Action<CallSite, object, object>>>(); | |
| private readonly Dictionary<string, CallSite<Func<CallSite, object, object>>> getters | |
| = new Dictionary<string, CallSite<Func<CallSite, object, object>>>(); | |
| public TypeWrapper(object d) |