Skip to content

Commit

Permalink
renamed method
Browse files Browse the repository at this point in the history
  • Loading branch information
IeuanWalker committed Aug 21, 2024
1 parent 368a172 commit 7ba290e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion TinyInsights/ApplicationInsightsProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ private void App_UnhandledException(object sender, Microsoft.UI.Xaml.UnhandledEx
}
#endif

public void AddGlobalProperty(string key, string value)
public void UpsertGlobalProperty(string key, string value)
{
client.Context.GlobalProperties[key] = value;
}
Expand Down
2 changes: 1 addition & 1 deletion TinyInsights/IInsights.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ public interface IInsights
{
void AddProvider(IInsightsProvider provider);

void AddGlobalProperty(string key, string value);
void UpsertGlobalProperty(string key, string value);

Task TrackErrorAsync(Exception ex, Dictionary<string, string>? properties = null);

Expand Down
2 changes: 1 addition & 1 deletion TinyInsights/IInsightsProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public interface IInsightsProvider
bool IsTrackEventsEnabled { get; set; }
bool IsTrackDependencyEnabled { get; set; }

void AddGlobalProperty(string key, string value);
void UpsertGlobalProperty(string key, string value);

Task TrackErrorAsync(Exception ex, Dictionary<string, string>? properties = null);

Expand Down
4 changes: 2 additions & 2 deletions TinyInsights/Insights.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ public class Insights : IInsights
{
private readonly List<IInsightsProvider> insightsProviders = new();

public void AddGlobalProperty(string key, string value)
public void UpsertGlobalProperty(string key, string value)
{
foreach(var provider in insightsProviders.Where(x => x.IsTrackErrorsEnabled))
{
provider.AddGlobalProperty(key, value);
provider.UpsertGlobalProperty(key, value);
}
}

Expand Down

0 comments on commit 7ba290e

Please sign in to comment.