Example #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: public void log(@Nonnull String message)
            public void log(string message)
            {
                lock (_outerInstance.@lock)
                {
                    _slf4jLogger.info(message);
                }
            }
Example #2
0
 public override T execute <T>(Command <T> command)
 {
     try
     {
         count++;   // only catch exception if we are at the top of the command stack
         // (there may be multiple nested command invocations and we need
         // to prevent that this intercepter swallows an exception)
         T result = next.execute(command);
         count--;
         return(result);
     }
     catch (AuthorizationException e)
     {
         count--;
         if (count == 0 && isActive)
         {
             lastException = e;
             LOG.info("Caught authorization exception; storing for assertion in test", e);
         }
         else
         {
             throw e;
         }
     }
     return(default(T));
 }
Example #3
0
 /// <summary>
 /// {@inheritDoc}
 /// </summary>
 public virtual T integrate(System.Func <U, T> f, U[] lower, U[] upper)
 {
     ArgChecker.notNull(f, "function was null");
     ArgChecker.notNull(lower, "lower bound array was null");
     ArgChecker.notNull(upper, "upper bound array was null");
     ArgChecker.notEmpty(lower, "lower bound array was empty");
     ArgChecker.notEmpty(upper, "upper bound array was empty");
     ArgChecker.notNull(lower[0], "lower bound was null");
     ArgChecker.notNull(upper[0], "upper bound was null");
     if (lower.Length > 1)
     {
         log.info("Lower bound array had more than one element; only using the first");
     }
     if (upper.Length > 1)
     {
         log.info("Upper bound array had more than one element; only using the first");
     }
     return(integrate(f, lower[0], upper[0]));
 }