From dec8ae021ac98f21647d07dca12408e6b7ec315e Mon Sep 17 00:00:00 2001 From: ArtursK Date: Thu, 25 Jan 2024 16:54:01 +0200 Subject: [PATCH] Removing unused "DoSleep" --- countlyCommon/countlyCommon/Server/ApiBase.cs | 2 - net35/Countly/Server/Api.cs | 5 - net45/Countly/Server/Api.cs | 5 - netstd/Countly/Countly.xml | 143 +++++++++++++----- netstd/Countly/Server/Api.cs | 6 +- 5 files changed, 109 insertions(+), 52 deletions(-) diff --git a/countlyCommon/countlyCommon/Server/ApiBase.cs b/countlyCommon/countlyCommon/Server/ApiBase.cs index 41342c51..a066dac1 100644 --- a/countlyCommon/countlyCommon/Server/ApiBase.cs +++ b/countlyCommon/countlyCommon/Server/ApiBase.cs @@ -17,8 +17,6 @@ abstract class ApiBase { internal const int maxLengthForDataInUrl = 2000; - protected abstract Task DoSleep(int sleepTime); - public async Task SendSession(string serverUrl, int rr, SessionEvent sessionEvent, CountlyUserDetails userDetails = null) { string userDetailsJson = string.Empty; diff --git a/net35/Countly/Server/Api.cs b/net35/Countly/Server/Api.cs index 85c4e993..1582ffc2 100644 --- a/net35/Countly/Server/Api.cs +++ b/net35/Countly/Server/Api.cs @@ -96,10 +96,5 @@ private static void CopyStream(Stream sourceStream, Stream targetStream) targetStream.Write(buffer, 0, n); } } - - protected override async Task DoSleep(int sleepTime) - { - Thread.Sleep(sleepTime); - } } } diff --git a/net45/Countly/Server/Api.cs b/net45/Countly/Server/Api.cs index 834e3096..0a190ead 100644 --- a/net45/Countly/Server/Api.cs +++ b/net45/Countly/Server/Api.cs @@ -96,10 +96,5 @@ private static void CopyStream(Stream sourceStream, Stream targetStream) targetStream.Write(buffer, 0, n); } } - - protected override async Task DoSleep(int sleepTime) - { - Thread.Sleep(sleepTime); - } } } diff --git a/netstd/Countly/Countly.xml b/netstd/Countly/Countly.xml index 7658bbcb..06cca107 100644 --- a/netstd/Countly/Countly.xml +++ b/netstd/Countly/Countly.xml @@ -296,41 +296,6 @@ Holds device-specific info in json-ready format - - - Name of the current operating system - - - - - Current operating system version - - - - - Local machine name (windows) or current device model (mobile) - - - - - Device resolution - - - - - Cellular mobile operator (where applicable) - - - - - Application version - - - - - Locale - - Creates Metrics object with provided values @@ -905,6 +870,14 @@ + + + Converts and object that has JsonSerializer annotations to String + No formatting and null values are ignored + + + + Saves object into file @@ -965,6 +938,106 @@ + + + Record event with multiple app and device support + + If it is empty or null, returns. required + If it is empty or null, defaults to app key given in the config + Event key, required + Defaults to null + Defaults to 1 + Defaults to null + Defaults to null + Defaults to current timestamp if not provided + + + + Record user properties + + If it is empty or null, returns. required + If it is empty or null, defaults to app key given in the config + Defaults to current timestamp if not provided + properties to set, should not be empty or null + + + + Record an exception + + If it is empty or null, returns. required + If it is empty or null, defaults to app key given in the config + Defaults to current timestamp if not provided + Custom info about exception, default null + name of the error, required + trace of the error, defaults to null + bool indicates is exception is fatal or not, default is false + breadcrumbs if any + if any. otherwise null + + + + Change device id with server merge + + The id that will going to be merged with the provided device id, should not be null or empty + If it is empty or null, returns. required + If it is empty or null, defaults to app key given in the config + Defaults to current timestamp if not provided + + + + Send direct request to the server + + Should not be null or empty, otherwise ignored + If it is empty or null, returns. required + If it is empty or null, defaults to app key given in the config + Defaults to current timestamp if not provided + + + + + Stop view with multiple app and device support + + + View name, required + Platform of the device or domain, required + Duration of the view, required + If it is empty or null, returns. required + If it is empty or null, defaults to app key given in the config + Defaults to null + Defaults to current timestamp if not provided + + + + Record event with multiple app and device support + + If it is empty or null, returns. required + If it is empty or null, defaults to app key given in the config + Event key, required + Defaults to null + Defaults to 1 + Defaults to null + Defaults to null + Defaults to current timestamp if not provided + + + + + Update session with multiple apps and devices + + Session duration in seconds, required + If it is empty or null, returns. required + If it is empty or null, defaults to app key given in the config + Defaults to current timestamp if not provided + + + + End session with multiple apps and devices + + Session duration in seconds,required + If it is empty or null, returns. required + If it is empty or null, defaults to app key given in the config + Defaults to current timestamp if not provided + Holds an array of segmentation values diff --git a/netstd/Countly/Server/Api.cs b/netstd/Countly/Server/Api.cs index a6ea4d82..0815193e 100644 --- a/netstd/Countly/Server/Api.cs +++ b/netstd/Countly/Server/Api.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.IO; using System.Net.Http; +using System.Threading; using System.Threading.Tasks; using CountlySDK.CountlyCommon.Server; using CountlySDK.CountlyCommon.Server.Responses; @@ -72,10 +73,5 @@ protected override async Task RequestAsync(string address, String return requestResult; } } - - protected override async Task DoSleep(int sleepTime) - { - System.Threading.Tasks.Task.Delay(sleepTime).Wait(); - } } }