コード例 #1
0
        protected override EasDeviceBudget CreateBudget(BudgetKey key, IThrottlingPolicy policy)
        {
            EasDeviceBudgetKey easDeviceBudgetKey = key as EasDeviceBudgetKey;

            if (easDeviceBudgetKey == null)
            {
                throw new ArgumentException("key must be an EasDeviceBudgetKey", "key");
            }
            return(new EasDeviceBudget(easDeviceBudgetKey, policy));
        }
コード例 #2
0
 private void Initialize(BudgetKey owner, IThrottlingPolicy policy, string policyPart, string policyValue, int backoffTime, string snapshot)
 {
     this.owner = owner.ToString();
     this.isServiceAccountBudget = owner.IsServiceAccountBudget;
     this.throttlingPolicyDN     = policy.GetIdentityString();
     this.budgetType             = owner.BudgetType;
     this.policyPart             = policyPart;
     this.policyValue            = policyValue;
     this.backoffTime            = backoffTime;
     this.snapshot = snapshot;
     ThrottlingPerfCounterWrapper.IncrementOverBudget(owner, TimeSpan.FromMilliseconds((double)backoffTime));
     WorkloadManagementLogger.SetOverBudget(policyPart, policyValue, null);
     WorkloadManagementLogger.SetBudgetType(owner.BudgetType.ToString(), null);
 }
コード例 #3
0
 // Token: 0x060017CE RID: 6094 RVA: 0x0008CA28 File Offset: 0x0008AC28
 internal EasDeviceBudget(BudgetKey key, IThrottlingPolicy policy) : base(key, policy)
 {
     this.allocator = EasDeviceBudgetAllocator.GetAllocator((key as EasDeviceBudgetKey).Sid);
     this.allocator.Add(this);
 }