public static T CreateDefault <T>() where T : TraderSettingsBase, new() { if (typeof(T) == typeof(KycProfileSettings)) { return(KycProfileSettings.CreateDefault() as T); } if (typeof(T) == typeof(AppUsageSettings)) { return(AppUsageSettings.CreateDefault() as T); } if (typeof(T) == typeof(AssetPairsInvertedSettings)) { return(AssetPairsInvertedSettings.CreateDefault() as T); } if (typeof(T) == typeof(LastBaseAssetsIos)) { return(LastBaseAssetsIos.CreateDefault() as T); } if (typeof(T) == typeof(LastBaseAssetsOther)) { return(LastBaseAssetsOther.CreateDefault() as T); } if (typeof(T) == typeof(RefundAddressSettings)) { return(RefundAddressSettings.CreateDefault() as T); } if (typeof(T) == typeof(PushNotificationsSettings)) { return(PushNotificationsSettings.CreateDefault() as T); } if (typeof(T) == typeof(MyLykkeSettings)) { return(MyLykkeSettings.CreateDefault() as T); } if (typeof(T) == typeof(BackupSettings)) { return(BackupSettings.CreateDefault() as T); } if (typeof(T) == typeof(SmsSettings)) { return(SmsSettings.CreateDefault() as T); } if (typeof(T) == typeof(HashedPwdSettings)) { return(HashedPwdSettings.CreateDefault() as T); } return(new T()); }
public static T CreateDefault <T>() where T : TraderSettingsBase, new() { if (typeof(T) == typeof(KycProfileSettings)) { return(KycProfileSettings.CreateDefault() as T); } if (typeof(T) == typeof(RefundAddressSettings)) { return(RefundAddressSettings.CreateDefault() as T); } if (typeof(T) == typeof(ApplicationsSettings)) { return(ApplicationsSettings.CreateDefault() as T); } return(new T()); }