public async Task SavePersistentDataAsync <T>(string roleId, string key, T data) { if (IsRocketModRole(roleId)) { throw new System.NotSupportedException(); } await m_BasePermissionRoleStore.SavePersistentDataAsync <T>(roleId, key, data); }
public Task SavePersistentDataAsync <T>(string roleId, string key, T?data) { if (string.IsNullOrEmpty(roleId)) { throw new ArgumentException(nameof(roleId)); } if (string.IsNullOrEmpty(key)) { throw new ArgumentException(nameof(key)); } if (RocketModIntegrationEnabled() && IsRocketModRole(roleId)) { return(Task.FromException(new NotSupportedException("Persistent data is not supported for RocketMod roles."))); } return(m_BasePermissionRoleStore.SavePersistentDataAsync(roleId, key, data)); }