You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1234567891011121314151617181920212223242526
  1. using System.Collections.Generic;
  2. using Luticate2.Utils.Dbo;
  3. using Microsoft.AspNetCore.Http;
  4. using Microsoft.AspNetCore.Mvc;
  5. using Microsoft.AspNetCore.SignalR.Infrastructure;
  6. namespace Luticate2.Utils.Controllers
  7. {
  8. public abstract class LuController : Controller
  9. {
  10. protected IConnectionManager ConnectionManager { get; set; }
  11. protected IDictionary<object, object> LuItems => (IDictionary<object, object>) HttpContext.Items["luticateItems"];
  12. // protected UsersDbo LuCurrentUser => (UsersDbo) LuItems["luticateItems"];
  13. protected T Handle<T>(LuResult<T> result)
  14. {
  15. if (result)
  16. {
  17. return result.Data;
  18. }
  19. return default(T);//TODO
  20. }
  21. }
  22. }