コード例 #1
0
 private IEnumerable <ShellContext> GetShellsToUpdate(IEnumerable <ShellContext> previousShells, IEnumerable <ShellContext> runningShells)
 {
     V_0            = new ModularBackgroundService.u003cu003ec__DisplayClass14_0();
     stackVariable1 = previousShells;
     stackVariable2 = ModularBackgroundService.u003cu003ec.u003cu003e9__14_0;
     if (stackVariable2 == null)
     {
         dummyVar0      = stackVariable2;
         stackVariable2 = new Func <ShellContext, bool>(ModularBackgroundService.u003cu003ec.u003cu003e9.u003cGetShellsToUpdateu003eb__14_0);
         ModularBackgroundService.u003cu003ec.u003cu003e9__14_0 = stackVariable2;
     }
     stackVariable3 = stackVariable1.Where <ShellContext>(stackVariable2);
     stackVariable4 = ModularBackgroundService.u003cu003ec.u003cu003e9__14_1;
     if (stackVariable4 == null)
     {
         dummyVar1      = stackVariable4;
         stackVariable4 = new Func <ShellContext, string>(ModularBackgroundService.u003cu003ec.u003cu003e9.u003cGetShellsToUpdateu003eb__14_1);
         ModularBackgroundService.u003cu003ec.u003cu003e9__14_1 = stackVariable4;
     }
     V_1 = stackVariable3.Select <ShellContext, string>(stackVariable4).ToArray <string>();
     if (V_1.Any <string>())
     {
         stackVariable52 = V_1;
         stackVariable53 = ModularBackgroundService.u003cu003ec.u003cu003e9__14_2;
         if (stackVariable53 == null)
         {
             dummyVar2       = stackVariable53;
             stackVariable53 = new Action <BackgroundTaskScheduler>(ModularBackgroundService.u003cu003ec.u003cu003e9.u003cGetShellsToUpdateu003eb__14_2);
             ModularBackgroundService.u003cu003ec.u003cu003e9__14_2 = stackVariable53;
         }
         this.UpdateSchedulers(stackVariable52, stackVariable53);
     }
     stackVariable10 = this._changeTokens;
     stackVariable11 = ModularBackgroundService.u003cu003ec.u003cu003e9__14_3;
     if (stackVariable11 == null)
     {
         dummyVar3       = stackVariable11;
         stackVariable11 = new Func <KeyValuePair <string, IChangeToken>, bool>(ModularBackgroundService.u003cu003ec.u003cu003e9.u003cGetShellsToUpdateu003eb__14_3);
         ModularBackgroundService.u003cu003ec.u003cu003e9__14_3 = stackVariable11;
     }
     stackVariable12 = stackVariable10.Where <KeyValuePair <string, IChangeToken> >(stackVariable11);
     stackVariable13 = ModularBackgroundService.u003cu003ec.u003cu003e9__14_4;
     if (stackVariable13 == null)
     {
         dummyVar4       = stackVariable13;
         stackVariable13 = new Func <KeyValuePair <string, IChangeToken>, string>(ModularBackgroundService.u003cu003ec.u003cu003e9.u003cGetShellsToUpdateu003eb__14_4);
         ModularBackgroundService.u003cu003ec.u003cu003e9__14_4 = stackVariable13;
     }
     V_2 = stackVariable12.Select <KeyValuePair <string, IChangeToken>, string>(stackVariable13).ToArray <string>();
     if (V_2.Any <string>())
     {
         stackVariable43 = V_2;
         stackVariable44 = ModularBackgroundService.u003cu003ec.u003cu003e9__14_5;
         if (stackVariable44 == null)
         {
             dummyVar5       = stackVariable44;
             stackVariable44 = new Action <BackgroundTaskScheduler>(ModularBackgroundService.u003cu003ec.u003cu003e9.u003cGetShellsToUpdateu003eb__14_5);
             ModularBackgroundService.u003cu003ec.u003cu003e9__14_5 = stackVariable44;
         }
         this.UpdateSchedulers(stackVariable43, stackVariable44);
     }
     stackVariable18 = previousShells;
     stackVariable19 = ModularBackgroundService.u003cu003ec.u003cu003e9__14_6;
     if (stackVariable19 == null)
     {
         dummyVar6       = stackVariable19;
         stackVariable19 = new Func <ShellContext, string>(ModularBackgroundService.u003cu003ec.u003cu003e9.u003cGetShellsToUpdateu003eb__14_6);
         ModularBackgroundService.u003cu003ec.u003cu003e9__14_6 = stackVariable19;
     }
     V_3             = stackVariable18.Select <ShellContext, string>(stackVariable19).Except <string>(V_1).Except <string>(V_2);
     stackVariable25 = V_0;
     stackVariable26 = runningShells;
     stackVariable27 = ModularBackgroundService.u003cu003ec.u003cu003e9__14_7;
     if (stackVariable27 == null)
     {
         dummyVar7       = stackVariable27;
         stackVariable27 = new Func <ShellContext, string>(ModularBackgroundService.u003cu003ec.u003cu003e9.u003cGetShellsToUpdateu003eb__14_7);
         ModularBackgroundService.u003cu003ec.u003cu003e9__14_7 = stackVariable27;
     }
     stackVariable25.tenantsToUpdate = stackVariable26.Select <ShellContext, string>(stackVariable27).Except <string>(V_3).ToArray <string>();
     return(runningShells.Where <ShellContext>(new Func <ShellContext, bool>(V_0.u003cGetShellsToUpdateu003eb__8)).ToArray <ShellContext>());
 }
コード例 #2
0
        public override void OnActionExecuting(ActionExecutingContext context)
        {
            this.GetLanguage();
            if (MixService.GetIpConfig <bool>("IsRetrictIp"))
            {
                V_0 = new BaseRestApiController <TDbContext, TModel, TView> .u003cu003ec__DisplayClass14_0();

                stackVariable7 = MixService.GetIpConfig <JArray>("AllowedIps");
                if (stackVariable7 == null)
                {
                    dummyVar0      = stackVariable7;
                    stackVariable7 = new JArray();
                }
                V_1            = stackVariable7;
                stackVariable9 = MixService.GetIpConfig <JArray>("ExceptIps");
                if (stackVariable9 == null)
                {
                    dummyVar1      = stackVariable9;
                    stackVariable9 = new JArray();
                }
                V_2             = stackVariable9;
                stackVariable10 = V_0;
                stackVariable13 = this.get_Request().get_HttpContext();
                if (stackVariable13 != null)
                {
                    stackVariable14 = stackVariable13.get_Connection();
                    if (stackVariable14 != null)
                    {
                        stackVariable15 = stackVariable14.get_RemoteIpAddress();
                        if (stackVariable15 != null)
                        {
                            stackVariable16 = stackVariable15.ToString();
                        }
                        else
                        {
                            dummyVar4       = stackVariable15;
                            stackVariable16 = null;
                        }
                    }
                    else
                    {
                        dummyVar3       = stackVariable14;
                        stackVariable16 = null;
                    }
                }
                else
                {
                    dummyVar2       = stackVariable13;
                    stackVariable16 = null;
                }
                stackVariable10.remoteIp = stackVariable16;
                stackVariable17          = V_1;
                stackVariable18          = BaseRestApiController <TDbContext, TModel, TView> .u003cu003ec.u003cu003e9__14_0;
                if (stackVariable18 == null)
                {
                    dummyVar5       = stackVariable18;
                    stackVariable18 = new Func <JToken, bool>(BaseRestApiController <TDbContext, TModel, TView> .u003cu003ec.u003cu003e9.u003cOnActionExecutingu003eb__14_0);
                    BaseRestApiController <TDbContext, TModel, TView> .u003cu003ec.u003cu003e9__14_0 = stackVariable18;
                }
                if (!stackVariable17.Any <JToken>(stackVariable18) && !V_1.Contains(JToken.op_Implicit(V_0.remoteIp)) || V_2.Any <JToken>(new Func <JToken, bool>(V_0.u003cOnActionExecutingu003eb__1)))
                {
                    this._forbidden = true;
                }
            }
            this.OnActionExecuting(context);
            return;
        }