コード例 #1
0
ファイル: Function.cs プロジェクト: cdf24/SearchWorker
        /*
         * /// <summary>
         * /// The main entry point for the custom runtime.
         * /// </summary>
         * /// <param name="args"></param>
         * private static async Task Main(string[] args)
         * {
         *  Func<SNSEvent, ILambdaContext, string> func = FunctionHandler;
         *  using(var handlerWrapper = HandlerWrapper.GetHandlerWrapper(func, new LambdaJsonSerializer()))
         *  using(var bootstrap = new LambdaBootstrap(handlerWrapper))
         *  {
         *      await bootstrap.RunAsync();
         *  }
         * }
         *
         * /// <summary>
         * /// A simple function that takes a string and does a ToUpper
         * ///
         * /// To use this handler to respond to an AWS event, reference the appropriate package from
         * /// https://github.com/aws/aws-lambda-dotnet#events
         * /// and change the string input parameter to the desired event type.
         * /// </summary>
         * /// <param name="input"></param>
         * /// <param name="context"></param>
         * /// <returns></returns>
         * public static string FunctionHandler(string input, ILambdaContext context)
         * {
         *  return input?.ToUpper();
         * }
         */

        public Function() : this(ElasticSearchHelper.GetInstance(ConfigurationHelper.Instance))
        {
        }
コード例 #2
0
 public SearchWorker() : this(ElasticSearchHelper.GetInstance(ConfigurationHelper.Instance))
 {
 }