Esempio n. 1
0
        public override IResult Execute(HttpContextBase context)
        {
            var q = context.Request.QueryString["q"];
            var p = int.Parse(context.Request.QueryString["p"]);

            new HQLCodeAssist(new NHConfigDataProvider(NHWebConsoleSetup.Configuration())).CodeComplete(q, p, this);
            return(new ViewResult(new SuggestionResponse {
                Error = error,
                Suggestions = string.Join(",", suggestions.Select(s => string.Format("\"{0}\"", s)).ToArray()),
            }, ViewName));
        }
Esempio n. 2
0
 public override void ProcessRequest(HttpContext context)
 {
     Session = NHWebConsoleSetup.OpenSession();
     try {
         Session.FlushMode = FlushMode.Never;
         base.ProcessRequest(context);
     } finally {
         if (NHWebConsoleSetup.DisposeSession)
         {
             Session.Dispose();
         }
     }
 }
Esempio n. 3
0
 public IndexController()
 {
     Cfg = NHWebConsoleSetup.Configuration();
 }