1234567891011121314151617181920212223242526 |
- using System.Collections.Generic;
- using Luticate2.Utils.Dbo;
- using Microsoft.AspNetCore.Http;
- using Microsoft.AspNetCore.Mvc;
- using Microsoft.AspNetCore.SignalR.Infrastructure;
-
- namespace Luticate2.Utils.Controllers
- {
- public abstract class LuController : Controller
- {
- protected IConnectionManager ConnectionManager { get; set; }
-
- protected IDictionary<object, object> LuItems => (IDictionary<object, object>) HttpContext.Items["luticateItems"];
-
- // protected UsersDbo LuCurrentUser => (UsersDbo) LuItems["luticateItems"];
-
- protected T Handle<T>(LuResult<T> result)
- {
- if (result)
- {
- return result.Data;
- }
- return default(T);//TODO
- }
- }
- }
|