This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"frameworks": { | |
"net46":{ | |
"dependencies": { | |
"Newtonsoft.Json": "8.0.3", | |
"Slack.Webhooks": "0.1.6" | |
} | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Text; | |
using System.Text.RegularExpressions; | |
using System.Threading.Tasks; | |
using Newtonsoft.Json; | |
using Newtonsoft.Json.Linq; | |
using Slack.Webhooks; | |
public static void Run(string myQueueItem, TraceWriter log) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"trigger_url": "https://api.runscope.com/radar/fcb31ec5-f6ac-43a4-ac7c-999999999999/trigger", | |
"name": "Azure Storage", | |
"version": "1.0", | |
"exported_at": 1485287745, | |
"steps": [ | |
{ | |
"url": "https://{{accountName}}.table.core.windows.net/{{tableName}}(PartitionKey='12345',RowKey='678910')", | |
"variables": [], | |
"args": {}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"trigger_url": "https://api.runscope.com/radar/fcb31ec5-f6ac-43a4-ac7c-999999999999/trigger", | |
"name": "Azure Storage", | |
"version": "1.0", | |
"exported_at": 1485291106, | |
"steps": [ | |
{ | |
"url": "https://{{accountName}}.table.core.windows.net/{{tableName}}?st=2017-01-23T20:39:00Z&se=2018-01-24T20:39:00Z&sp=raud&sv=2015-12-11&tn={{tableName}}&sig=9999999999999999999999999999999=&$filter=PartitionKey eq '12345' and RowKey eq '678910'", | |
"variables": [], | |
"args": {}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.IO; | |
using System.Reflection; | |
using System.Web.Http; | |
using System.Web.Http.SelfHost; | |
using System.Web.Http.Dispatcher; | |
public class ControllerResolver : DefaultHttpControllerTypeResolver | |
{ | |
public override ICollection<Type> GetControllerTypes(IAssembliesResolver assembliesResolver) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Logger = new LoggerConfiguration() | |
.Enrich.WithMachineName() | |
.Enrich.WithProcessId() | |
.Enrich.WithProcessName() | |
.Destructure.ByTransforming<UserContext>(d => new | |
{ | |
d.Id, | |
d.Name, | |
d.IsActive | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Logger = new LoggerConfiguration() | |
.WriteTo.EventGrid() | |
.CreateLogger(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<appSettings> | |
<add key="EventGridTopicUri" value="https://my-custom-topic.westus2-1.eventgrid.azure.net/api/events" /> | |
<add key="EventGridTopicKey" value="MyKeyOrSASToken" /> | |
</appSettings> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// using the ILogger Event extension methods | |
Logger.Event("import", $"myApp/myLogic/customRecord", "Processing completed {@recordCount}", records.Count); | |
Log.EventType("import", "Processing completed {@recordCount}", records.Count); | |
Log.EventSubject("myApp/myLogic/customRecord", "Processing completed {@recordCount}", records.Count); | |
// use attributes | |
[EventGridSubject("myApp/myLogic/customRecord")] | |
public class MyImportClass | |
{ | |
[EventGridType("import")] |