-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update ApplicationInsights components
- Loading branch information
Showing
6 changed files
with
46 additions
and
49 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,109 +1,107 @@ | ||
using System; | ||
using BlazorApplicationInsights; | ||
using System.Collections.Generic; | ||
using System.Threading.Tasks; | ||
using Microsoft.JSInterop; | ||
using BlazorApplicationInsights.Interfaces; | ||
using BlazorApplicationInsights.Models; | ||
|
||
namespace NRZMyk.Components.Playground | ||
{ | ||
internal class NullApplicationInsights : IApplicationInsights | ||
{ | ||
public Task InitBlazorApplicationInsightsAsync(IJSRuntime jSRuntime) | ||
public CookieMgr GetCookieMgr() | ||
{ | ||
return Task.CompletedTask; | ||
return null; | ||
} | ||
|
||
public Task TrackEvent(string name, Dictionary<string, object> properties = null) | ||
public Task TrackEvent(EventTelemetry @event) | ||
{ | ||
return Task.CompletedTask; | ||
return Task.CompletedTask; | ||
} | ||
|
||
public Task TrackTrace(string message, SeverityLevel? severityLevel = null, Dictionary<string, object> properties = null) | ||
public Task TrackPageView(PageViewTelemetry pageView = null) | ||
{ | ||
return Task.CompletedTask; | ||
return Task.CompletedTask; | ||
} | ||
|
||
public Task TrackException(Error exception, string id = null, SeverityLevel? severityLevel = null, | ||
Dictionary<string, object> properties = null) | ||
public Task TrackException(ExceptionTelemetry exception) | ||
{ | ||
return Task.CompletedTask; | ||
return Task.CompletedTask; | ||
} | ||
|
||
public Task TrackPageView(string name = null, string uri = null, string refUri = null, string pageType = null, | ||
bool? isLoggedIn = null, Dictionary<string, object> properties = null) | ||
public Task TrackTrace(TraceTelemetry trace) | ||
{ | ||
return Task.CompletedTask; | ||
return Task.CompletedTask; | ||
} | ||
|
||
public Task TrackMetric(MetricTelemetry metric) | ||
{ | ||
return Task.CompletedTask; | ||
} | ||
|
||
public Task StartTrackPage(string name = null) | ||
{ | ||
return Task.CompletedTask; | ||
return Task.CompletedTask; | ||
} | ||
|
||
public Task StopTrackPage(string name = null, string url = null, Dictionary<string, string> properties = null, | ||
public Task StopTrackPage(string name = null, string url = null, Dictionary<string, object> customProperties = null, | ||
Dictionary<string, decimal> measurements = null) | ||
{ | ||
return Task.CompletedTask; | ||
return Task.CompletedTask; | ||
} | ||
|
||
public Task TrackMetric(string name, double average, double? sampleCount = null, double? min = null, double? max = null, | ||
Dictionary<string, object> properties = null) | ||
public Task StartTrackEvent(string name) | ||
{ | ||
return Task.CompletedTask; | ||
return Task.CompletedTask; | ||
} | ||
|
||
public Task TrackDependencyData(string id, string name, decimal? duration = null, bool? success = null, | ||
DateTime? startTime = null, int? responseCode = null, string correlationContext = null, string type = null, | ||
string data = null, string target = null) | ||
public Task StopTrackEvent(string name, Dictionary<string, object> properties = null, Dictionary<string, decimal> measurements = null) | ||
{ | ||
return Task.CompletedTask; | ||
return Task.CompletedTask; | ||
} | ||
|
||
public Task Flush(bool? async) | ||
public Task AddTelemetryInitializer(TelemetryItem telemetryItem) | ||
{ | ||
return Task.CompletedTask; | ||
return Task.CompletedTask; | ||
} | ||
|
||
public Task ClearAuthenticatedUserContext() | ||
public Task TrackPageViewPerformance(PageViewPerformanceTelemetry pageViewPerformance) | ||
{ | ||
return Task.CompletedTask; | ||
return Task.CompletedTask; | ||
} | ||
|
||
public Task SetAuthenticatedUserContext(string authenticatedUserId, string accountId = null, bool storeInCookie = false) | ||
public Task TrackDependencyData(DependencyTelemetry dependency) | ||
{ | ||
return Task.CompletedTask; | ||
return Task.CompletedTask; | ||
} | ||
|
||
public Task AddTelemetryInitializer(TelemetryItem telemetryItem) | ||
public Task<TelemetryContext> Context() | ||
{ | ||
return Task.CompletedTask; | ||
return Task.FromResult(new TelemetryContext()); | ||
} | ||
|
||
public Task TrackPageViewPerformance(PageViewPerformanceTelemetry pageViewPerformance) | ||
public Task Flush() | ||
{ | ||
return Task.CompletedTask; | ||
return Task.CompletedTask; | ||
} | ||
|
||
public Task StartTrackEvent(string name) | ||
public Task ClearAuthenticatedUserContext() | ||
{ | ||
return Task.CompletedTask; | ||
return Task.CompletedTask; | ||
} | ||
|
||
public Task StopTrackEvent(string name, Dictionary<string, string> properties = null, Dictionary<string, decimal> measurements = null) | ||
public Task SetAuthenticatedUserContext(string authenticatedUserId, string accountId = null, bool? storeInCookie = null) | ||
{ | ||
return Task.CompletedTask; | ||
return Task.CompletedTask; | ||
} | ||
|
||
public Task SetInstrumentationKey(string key) | ||
public Task UpdateCfg(Config newConfig, bool mergeExisting = true) | ||
{ | ||
return Task.CompletedTask; | ||
return Task.CompletedTask; | ||
} | ||
|
||
public Task LoadAppInsights() | ||
public void InitJSRuntime(IJSRuntime jSRuntime) | ||
{ | ||
return Task.CompletedTask; | ||
} | ||
|
||
public bool EnableAutoRouteTracking { get; set; } | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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