public static async Task RemoveAsync(RelationDataType type, long userId, IEnumerable <long> removalIds) { switch (type) { case RelationDataType.Following: await RemoveFollowingsAsync(userId, removalIds); break; case RelationDataType.Follower: await RemoveFollowersAsync(userId, removalIds); break; case RelationDataType.Blocking: await RemoveBlockingsAsync(userId, removalIds); break; case RelationDataType.NoRetweets: await RemoveNoRetweetsAsync(userId, removalIds); break; case RelationDataType.Mutes: await RemoveMutesAsync(userId, removalIds); break; default: throw new ArgumentOutOfRangeException("type"); } }
public static async Task AddAsync(RelationDataType type, long userId, IEnumerable <long> targetIds) { switch (type) { case RelationDataType.Following: await AddFollowingsAsync(userId, targetIds); break; case RelationDataType.Follower: await AddFollowersAsync(userId, targetIds); break; case RelationDataType.Blocking: await AddBlockingsAsync(userId, targetIds); break; case RelationDataType.NoRetweets: await AddNoRetweetsAsync(userId, targetIds); break; case RelationDataType.Mutes: await AddMutesAsync(userId, targetIds); break; default: throw new ArgumentOutOfRangeException("type"); } }
public static async Task SetAsync(RelationDataType type, long userId, long targetId, bool value) { switch (type) { case RelationDataType.Following: await SetFollowingAsync(userId, targetId, value); return; case RelationDataType.Follower: await SetFollowerAsync(userId, targetId, value); break; case RelationDataType.Blocking: await SetBlockingAsync(userId, targetId, value); break; case RelationDataType.NoRetweets: await SetNoRetweetsAsync(userId, targetId, value); break; case RelationDataType.Mutes: await SetMutedAsync(userId, targetId, value); break; default: throw new ArgumentOutOfRangeException("type"); } }
public static Task <IEnumerable <long> > GetAllAsync(RelationDataType type) { switch (type) { case RelationDataType.Following: return(GetFollowingsAllAsync()); case RelationDataType.Follower: return(GetFollowersAllAsync()); case RelationDataType.Blocking: return(GetBlockingsAllAsync()); case RelationDataType.NoRetweets: return(GetNoRetweetsAllAsync()); case RelationDataType.Mutes: return(GetMutesAllAsync()); default: throw new ArgumentOutOfRangeException(nameof(type)); } }
public static Task RemoveAsync(RelationDataType type, long userId, IEnumerable <long> removalIds) { switch (type) { case RelationDataType.Following: return(RemoveFollowingsAsync(userId, removalIds)); case RelationDataType.Follower: return(RemoveFollowersAsync(userId, removalIds)); case RelationDataType.Blocking: return(RemoveBlockingsAsync(userId, removalIds)); case RelationDataType.NoRetweets: return(RemoveNoRetweetsAsync(userId, removalIds)); case RelationDataType.Mutes: return(RemoveMutesAsync(userId, removalIds)); default: throw new ArgumentOutOfRangeException(nameof(type)); } }
public static Task AddAsync(RelationDataType type, long userId, IEnumerable <long> targetIds) { switch (type) { case RelationDataType.Following: return(AddFollowingsAsync(userId, targetIds)); case RelationDataType.Follower: return(AddFollowersAsync(userId, targetIds)); case RelationDataType.Blocking: return(AddBlockingsAsync(userId, targetIds)); case RelationDataType.NoRetweets: return(AddNoRetweetsAsync(userId, targetIds)); case RelationDataType.Mutes: return(AddMutesAsync(userId, targetIds)); default: throw new ArgumentOutOfRangeException(nameof(type)); } }
public static Task SetAsync(RelationDataType type, long userId, long targetId, bool value) { switch (type) { case RelationDataType.Following: return(SetFollowingAsync(userId, targetId, value)); case RelationDataType.Follower: return(SetFollowerAsync(userId, targetId, value)); case RelationDataType.Blocking: return(SetBlockingAsync(userId, targetId, value)); case RelationDataType.NoRetweets: return(SetNoRetweetsAsync(userId, targetId, value)); case RelationDataType.Mutes: return(SetMutedAsync(userId, targetId, value)); default: throw new ArgumentOutOfRangeException(nameof(type)); } }
public static Task <bool> ContainsAsync(RelationDataType type, long userId, long targetId) { switch (type) { case RelationDataType.Following: return(IsFollowingAsync(userId, targetId)); case RelationDataType.Follower: return(IsFollowerAsync(userId, targetId)); case RelationDataType.Blocking: return(IsBlockingAsync(userId, targetId)); case RelationDataType.NoRetweets: return(IsNoRetweetsAsync(userId, targetId)); case RelationDataType.Mutes: return(IsMutedAsync(userId, targetId)); default: throw new ArgumentOutOfRangeException(nameof(type)); } }
public static async Task <IEnumerable <long> > GetAsync(RelationDataType type, long userId) { switch (type) { case RelationDataType.Following: return(await GetFollowingsAsync(userId)); case RelationDataType.Follower: return(await GetFollowersAsync(userId)); case RelationDataType.Blocking: return(await GetBlockingsAsync(userId)); case RelationDataType.NoRetweets: return(await GetNoRetweetsAsync(userId)); case RelationDataType.Mutes: return(await GetMutesAsync(userId)); default: throw new ArgumentOutOfRangeException("type"); } }
public AccountRelationDataChunk(AccountRelationData parent, RelationDataType type) { _parent = parent; _type = type; Task.Run(() => InitializeCollection()); }
public AccountRelationDataChunk(AccountRelationData parent, RelationDataType type) { this._parent = parent; this._type = type; Task.Run(() => this.InitializeCollection()); }
public static async Task<IEnumerable<long>> GetAllAsync(RelationDataType type) { switch (type) { case RelationDataType.Following: return await GetFollowingsAllAsync(); case RelationDataType.Follower: return await GetFollowersAllAsync(); case RelationDataType.Blocking: return await GetBlockingsAllAsync(); case RelationDataType.NoRetweets: return await GetNoRetweetsAllAsync(); case RelationDataType.Mutes: return await GetMutesAllAsync(); default: throw new ArgumentOutOfRangeException("type"); } }
public static async Task RemoveAsync(RelationDataType type, long userId, IEnumerable<long> removalIds) { switch (type) { case RelationDataType.Following: await RemoveFollowingsAsync(userId, removalIds); break; case RelationDataType.Follower: await RemoveFollowersAsync(userId, removalIds); break; case RelationDataType.Blocking: await RemoveBlockingsAsync(userId, removalIds); break; case RelationDataType.NoRetweets: await RemoveNoRetweetsAsync(userId, removalIds); break; case RelationDataType.Mutes: await RemoveMutesAsync(userId, removalIds); break; default: throw new ArgumentOutOfRangeException("type"); } }
public static async Task AddAsync(RelationDataType type, long userId, IEnumerable<long> targetIds) { switch (type) { case RelationDataType.Following: await AddFollowingsAsync(userId, targetIds); break; case RelationDataType.Follower: await AddFollowersAsync(userId, targetIds); break; case RelationDataType.Blocking: await AddBlockingsAsync(userId, targetIds); break; case RelationDataType.NoRetweets: await AddNoRetweetsAsync(userId, targetIds); break; case RelationDataType.Mutes: await AddMutesAsync(userId, targetIds); break; default: throw new ArgumentOutOfRangeException("type"); } }
public static async Task<bool> ContainsAsync(RelationDataType type, long userId, long targetId) { switch (type) { case RelationDataType.Following: return await IsFollowingAsync(userId, targetId); case RelationDataType.Follower: return await IsFollowerAsync(userId, targetId); case RelationDataType.Blocking: return await IsBlockingAsync(userId, targetId); case RelationDataType.NoRetweets: return await IsNoRetweetsAsync(userId, targetId); case RelationDataType.Mutes: return await IsMutedAsync(userId, targetId); default: throw new ArgumentOutOfRangeException("type"); } }