/// <summary>
        /// Creates a new Instance of TrackZeroClient
        /// </summary>
        /// <param name="serviceProvider"></param>
        /// <param name="clientFactory"></param>
        /// <param name="throwExceptions"></param>
        public TrackZeroClient(IServiceProvider serviceProvider, IHttpClientFactory clientFactory, bool throwExceptions)
        {
            this.clientFactory = clientFactory;
            var loggerFactory = serviceProvider.GetService <ILoggerFactory>();

            this.logger          = loggerFactory?.CreateLogger <TrackZeroClient>();
            this.throwExceptions = throwExceptions;
            Instance             = this;
        }
Beispiel #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="entity"></param>
 /// <param name="analyticsSpaceId"></param>
 /// <param name="trackZeroClient"></param>
 /// <returns></returns>
 public static async Task <TrackZeroOperationResult <Entity> > TrackUsingAsync(this Entity entity, string analyticsSpaceId, TrackZeroClient trackZeroClient)
 {
     return(await trackZeroClient.UpsertEntityAsync(entity, analyticsSpaceId).ConfigureAwait(false));
 }