Created
March 19, 2017 18:42
-
-
Save patkleef/f686ae57a88a0141778cff6116bc715c to your computer and use it in GitHub Desktop.
Application Insights Blog - ApplicationInsightsDataService.cs
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
| public class DataService | |
| { | |
| private readonly TelemetryClient _telemetryClient; | |
| private readonly IDictionary<string, int> _dic; | |
| public DataService() | |
| { | |
| _telemetryClient = new TelemetryClient(); | |
| _dic = new Dictionary<string, int>(); | |
| _dic.Add("house", 0); | |
| _dic.Add("carr", 1); | |
| _dic.Add("work", 2); | |
| } | |
| public int GetKeyByCategory(string category) | |
| { | |
| return _dic[category]; | |
| } | |
| public void Save(int key, RegisterModel model) | |
| { | |
| _telemetryClient.TrackEvent("Registered event"); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment