public void SaveSetting(NotificationEditorSetting setting) { if (iOSNotificationEditorSettingsValues == null) { iOSNotificationEditorSettingsValues = new iOSNotificationEditorSettingsCollection(); } iOSNotificationEditorSettingsValues[setting.key] = setting.val; }
public T GetiOSNotificationEditorSettingsValue <T>(string key, T defaultValue) { if (iOSNotificationEditorSettingsValues == null) { iOSNotificationEditorSettingsValues = new iOSNotificationEditorSettingsCollection(); } try { var val = iOSNotificationEditorSettingsValues[key]; if (val != null) { return((T)val); } } catch (InvalidCastException ex) { Debug.LogWarning(ex.ToString()); iOSNotificationEditorSettingsValues = new iOSNotificationEditorSettingsCollection(); } iOSNotificationEditorSettingsValues[key] = defaultValue; return(defaultValue); }