Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void FieldDevicePollingStatusDispatch_Run ([TimerTrigger("%ScheduleDispatch%")]TimerInfo myTimer,
- [Queue("%DispatchQueueName%", Connection = "AVStorageAccessKey")] out string msg, //output binding
- ILogger log)
- {
- oConnect.Open();
- DataTable oDataTable = new DataTable();
- SqlCommand objCommand = new SqlCommand("CallProc", oConnect);
- objCommand.CommandType = CommandType.StoredProcedure;
- objCommand.Connection = oConnect;
- SqlDataAdapter oDataAdapter = new SqlDataAdapter(objCommand);
- oDataAdapter.Fill(oDataTable);
- msg = // Content from the table, need one column from table.
- }
- [StorageAccount("AzureWebJobsStorage")]
- public static class QueueFunctions
- {
- [FunctionName("QueueOutput")]
- [return: Queue("myqueue-items")]
- public static string QueueOutput([HttpTrigger] dynamic input, ILogger log)
- {
- log.LogInformation($"C# function processed: {input.Text}");
- return input.Text;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement