예제 #1
0
        public static void CorrectImplementationWithBinding(
            [ServiceBusTrigger("correct-implementation-netstandard", Connection = "ServiceBusConnection")]
            IncomingNetStandardModel netStandardModel,
            [Http(Url = "%BaseAddress%api/Echo/{Identifier}")]
            HttpModel httpModel,
            ILogger log)
        {
            log.LogInformation($"Executing ServiceBus queue trigger. Processing message: {netStandardModel.Identifier}");

            log.LogInformation($"Executed ServiceBus queue trigger. Processing message: {netStandardModel.Identifier}");
        }
예제 #2
0
        public static async Task Run(
            [ServiceBusTrigger("correct-implementation-netstandard", Connection = "ServiceBusConnection")]
            IncomingNetStandardModel netStandardModel,
            ILogger log)
        {
            log.LogInformation($"Executing ServiceBus queue trigger. Processing message: {netStandardModel.Identifier}");

            var baseAddress = Environment.GetEnvironmentVariable("BaseAddress", EnvironmentVariableTarget.Process);
            await HttpClient.GetAsync($"{baseAddress}api/Echo/{netStandardModel.Identifier}");

            log.LogInformation($"Executed ServiceBus queue trigger. Processing message: {netStandardModel.Identifier}");
        }