Пример #1
0
        public void Test1()
        {
            SomeFunction p = x => x - 1;
            ActionInt    w = x => Debug.WriteLine(x);
            ActionInt    v = x => Debug.WriteLine("hello: {0}", x);

            f2(1, v);
        }
Пример #2
0
 public static void Table(SomeFunction F, double a, double x, double end)
 {
     Console.WriteLine("----- A -------- X -------- Y ----");
     while (x <= end)
     {
         Console.WriteLine("| {0,8:0.000} | {1,8:0.000} | {2,8:0.000} |", a, x, F(a, x));
         x += 1;
     }
     Console.WriteLine("----------------------------------");
 }
Пример #3
0
        public void Test1()
        {
            _output.WriteLine($"_options={_options}");

            var(result, methodName) = new SomeFunction(_options).SomeMethod();

            _output.WriteLine($"result={result}, methodName={methodName}");

            Assert.Equal(_options.MyBizOptions10, result);
            Assert.Equal(@"SomeMethod", methodName);
        }
        public static IActionResult Run(
            [HttpTrigger(AuthorizationLevel.Anonymous, "get", Route = null)] HttpRequest req,
            ILogger logger,
            [CbOptions(sectionKey: "SampleBizLogic:MyBizOptions", reloadOnChange: true)] MyBizOptions options
            )
        {
            logger.LogInformation("C# HTTP trigger function processed a request.");
            logger.LogInformation($"options={options}");

            var(result, methodName) = new SomeFunction(options).SomeMethod();

            logger.LogInformation($"result={result}, methodName={methodName}");

            return(options != null
                ? (ActionResult) new OkObjectResult($"result={result}, methodName={methodName}")
                : new BadRequestObjectResult("Please check settings and enviroments."));
        }
 public string[] GetById(SomeFunction func, int index)
 {
     return(func(index));
 }