using System; using Plugins.Countly.Enums; namespace Plugins.Countly.Models { [Serializable] public class CountlyConfigModel { public string Salt; public bool EnableFirstAppLaunchSegment; public bool EnablePost; public bool EnableConsoleErrorLogging; public bool IgnoreSessionCooldown; public TestMode NotificationMode; public bool EnableManualSessionHandling; public int SessionDuration; public int EventViewSendThreshold; public int EventNonViewSendThreshold; public int StoredRequestLimit; public int TotalBreadcrumbsAllowed; public bool EnableAutomaticCrashReporting; /// /// Initializes the SDK configurations /// /// /// /// /// /// /// Session is updated after each interval passed. /// This interval is also used to process request queue. The interval must be in seconds /// public CountlyConfigModel(string salt, bool enablePost = false, bool enableConsoleErrorLogging = false, bool ignoreSessionCooldown = false, bool enableManualSessionHandling = false, int sessionDuration = 60, int eventViewThreshold = 100, int storedRequestLimit = 1000, int totalBreadcrumbsAllowed = 100, TestMode notificationMode = TestMode.None, bool enableAutomaticCrashReporting = true) { this.Salt = salt; EnablePost = enablePost; EnableConsoleErrorLogging = enableConsoleErrorLogging; IgnoreSessionCooldown = ignoreSessionCooldown; NotificationMode = notificationMode; SessionDuration = sessionDuration; EnableManualSessionHandling = enableManualSessionHandling; EventViewSendThreshold = eventViewThreshold; StoredRequestLimit = storedRequestLimit; TotalBreadcrumbsAllowed = totalBreadcrumbsAllowed; EnableAutomaticCrashReporting = enableAutomaticCrashReporting; } public override string ToString() { return $"{nameof(Salt)}: {Salt}, {nameof(EnablePost)}: {EnablePost}, {nameof(EnableConsoleErrorLogging)}: {EnableConsoleErrorLogging}, {nameof(IgnoreSessionCooldown)}: {IgnoreSessionCooldown}, {nameof(NotificationMode)}: {NotificationMode}, {nameof(EnableManualSessionHandling)}: {EnableManualSessionHandling}, {nameof(SessionDuration)}: {SessionDuration}, {nameof(EventViewSendThreshold)}: {EventViewSendThreshold}, {nameof(EventNonViewSendThreshold)}: {EventNonViewSendThreshold}, {nameof(StoredRequestLimit)}: {StoredRequestLimit}, {nameof(TotalBreadcrumbsAllowed)}: {TotalBreadcrumbsAllowed}, {nameof(EnableAutomaticCrashReporting)}: {EnableAutomaticCrashReporting}"; } } }