Esempio n. 1
0
 internal static void ValidateEventHubPrefetchCount(int value)
 {
     if (value < Constants.EventHubMinimumPrefetchCount)
     {
         throw FxTrace.Exception.ArgumentOutOfRange("PrefetchCount", value, SRClient.ArgumentOutOfRange(Constants.EventHubMinimumPrefetchCount, 2147483647));
     }
 }
Esempio n. 2
0
        public void SetAt(long newDueTime)
        {
            if (newDueTime >= TimeSpan.MaxValue.Ticks || newDueTime < 0)
            {
                throw Fx.Exception.ArgumentOutOfRange("newDueTime", newDueTime, SRClient.ArgumentOutOfRange(0, TimeSpan.MaxValue.Ticks - 1));
            }

            TimerManager.Value.Set(this, newDueTime);
        }
Esempio n. 3
0
 public void SetAt(long newDueTimeInTicks)
 {
     if (newDueTimeInTicks >= TimeSpan.MaxValue.Ticks || newDueTimeInTicks < (long)0)
     {
         ExceptionTrace exception = Fx.Exception;
         object         obj       = newDueTimeInTicks;
         object         obj1      = 0;
         TimeSpan       maxValue  = TimeSpan.MaxValue;
         throw exception.ArgumentOutOfRange("newDueTime", obj, SRClient.ArgumentOutOfRange(obj1, maxValue.Ticks - (long)1));
     }
     IOThreadTimer.TimerManager.Value.Set(this, newDueTimeInTicks);
 }
 protected PairedNamespaceOptions(NamespaceManager secondaryNamespaceManager, MessagingFactory secondaryMessagingFactory, TimeSpan failoverInterval)
 {
     if (secondaryNamespaceManager == null)
     {
         Fx.Exception.ArgumentNull("secondaryNamespaceManager");
     }
     if (secondaryMessagingFactory == null)
     {
         Fx.Exception.ArgumentNull("secondaryMessagingFactory");
     }
     if (failoverInterval < Constants.MinPrimaryFailoverInterval || failoverInterval > Constants.MaxPrimaryFailoverInterval)
     {
         Fx.Exception.ArgumentOutOfRange("failoverInterval", failoverInterval, SRClient.ArgumentOutOfRange(Constants.MinPrimaryFailoverInterval, Constants.MaxPrimaryFailoverInterval));
     }
     this.secondaryNamespaceManager = secondaryNamespaceManager;
     this.secondaryMessagingFactory = secondaryMessagingFactory;
     this.failoverInterval          = failoverInterval;
 }