Beispiel #1
0
        protected BaseApiController(WutCache cache, WutNuContext models)
        {
            WebContextBase = new HttpContextWrapper(HttpContext.Current);
            Wutcontext     = models;
            Wutcache       = cache;
            var uid = WebContextBase.User.Identity;

            if (uid.IsAuthenticated)
            {
                UserId    = uid.GetClaim <int>(CustomClaimTypes.UserId);
                OwnerOID  = uid.GetClaim(CustomClaimTypes.ObjectIdentifier);
                UserEmail = uid.GetClaim(ClaimTypes.Email);
            }
        }
Beispiel #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="BaseBusinessLayer"/> class.
        /// </summary>
        /// <param name="httpContext">The HTTP context.</param>
        public BaseBusinessLayer(HttpContextBase httpContext, WutNuContext context, WutCache cache)
        {
            io      = context;
            htxBase = httpContext;
            //io.Configuration.ProxyCreationEnabled = false;
            //io.Configuration.AutoDetectChangesEnabled = false;
            io.Configuration.LazyLoadingEnabled = true;

            Wutcache = cache;
            //Wutcache = httpContext.GetOwinContext().Get<WutCache>("WutCache");
            var ident = httpContext.User.Identity;

            if (ident.IsAuthenticated)
            {
                UserIO = ident.GetClaim(CustomClaimTypes.ObjectIdentifier);
            }
        }
Beispiel #3
0
        protected BaseController(WutCache cache, WutNuContext models)
        {
            try
            {
                Wutcontext = models;
                Wutcache   = cache;
                var uid = System.Web.HttpContext.Current.User.Identity;

                if (uid.IsAuthenticated)
                {
                    UserId    = uid.GetClaim <int>(CustomClaimTypes.UserId);
                    OwnerOID  = uid.GetClaim(CustomClaimTypes.ObjectIdentifier);
                    UserEmail = uid.GetClaim(ClaimTypes.Email);
                }
            }
            catch (System.Exception ex)
            {
                Logging.WriteDebugInfoToErrorLog(ex.Message, ex);
                throw;
            }
        }
Beispiel #4
0
 public ErrorLogController(WutCache cache, WutNuContext models)
     : base(cache, models)
 {
     _err = new ErrorItemBL(WebContextBase, Wutcontext);
 }
Beispiel #5
0
 public ListController(WutCache cache, WutNuContext models)
     : base(cache, models)
 {
 }
Beispiel #6
0
 public ReportsController(WutCache cache, WutNuContext models)
     : base(cache, models)
 {
 }
Beispiel #7
0
 public FileController(WutCache cache, WutNuContext models)
     : base(cache, models)
 {
     containerName = OwnerOID;
 }
Beispiel #8
0
 public UpdateErrorController(WutCache cache, WutNuContext models)
     : base(cache, models)
 {
 }
Beispiel #9
0
 public ErrorLogController(WutCache cache, WutNuContext models)
     : base(cache, models)
 {
 }
Beispiel #10
0
 public ProfileController(WutCache cache, WutNuContext models)
     : base(cache, models)
 {
 }
Beispiel #11
0
 public HealthcheckController(WutCache cache, WutNuContext models)
 {
     _context = models;
     _cache   = cache;
 }
Beispiel #12
0
 public ReportController(WutCache cache, WutNuContext context)
     : base(cache, context)
 {
     _repo = new ReportRepo(context);
 }
Beispiel #13
0
 public ProfileController(WutCache cache, WutNuContext models)
     : base(cache, models)
 {
     _repo = new UserRepo(models);
 }