public static InternalMessage Run( [QueueTrigger(INTERNAL_QUEUE, Connection = "")] O365Message myQueueItem, TraceWriter log) { log.Info($"C# Queue trigger function processed: {myQueueItem}"); var next = new InternalMessage { Subject = myQueueItem.Subject, Body = myQueueItem.Body, From = myQueueItem.From, To = myQueueItem.To, }; if (_count++ % 2 == 0 || myQueueItem.Subject == "fail") { throw new System.Exception("failing!"); } //{ // Subject = "sub", // Body = "bod", // From = "from", // To = "to", //}; return(next); }
public static ParsedMessage Run2( [QueueTrigger(O365_QUEUE, Connection = "")] InternalMessage myQueueItem, TraceWriter log) { log.Info($"C# Queue trigger function processed: {myQueueItem}"); var next = new ParsedMessage { Subject = myQueueItem.Subject, Body = myQueueItem.Body, Participants = new List <string> { myQueueItem.From, myQueueItem.To, }, }; return(next); }