예제 #1
0
 public void SynchronousFunction(SciterElement element, SciterValue arg1, SciterValue arg2, SciterValue arg3, SciterValue arg4, SciterValue arg5)
 {
     _logger?.LogInformation(
         "{NameOfMethod}(arg1: {Arg1}; arg2: {Arg2}; arg3: {Arg3}; arg4: {Arg4}; arg5: {Arg5}) was executed!",
         nameof(SynchronousFunction), arg1.AsInt32(), arg2.AsInt32(), arg3.AsInt32(), arg4.AsInt32(),
         arg5.AsInt32());
 }
예제 #2
0
        public Task ThrowException(SciterValue numerator, SciterValue denominator)
        {
            try
            {
                //This will purposely throw an exception!
                var value = numerator.AsInt32() / denominator.AsInt32();

                return(Task.FromResult(SciterValue.Create(value)));
            }
            catch (Exception ex)
            {
                _logger.LogError(exception: ex, message: "{Message}", ex.Message);
                throw;
            }
        }
예제 #3
0
 public void SynchronousArgumentsFunction(SciterElement element, SciterValue arg1, SciterValue arg2, SciterValue arg3, SciterValue arg4, SciterValue arg5)
 {
     _logger.LogInformation($"{nameof(SynchronousArgumentsFunction)} was executed!\n\t{arg1.AsInt32()},{arg2.AsInt32()},{arg3.AsInt32()},{arg4.AsInt32()},{arg5.AsInt32()}");
 }