public Dictionary <string, StatusResult> ClearFlags(params string[] ids) { return(_innerClient .ClearFlags(GrpcExtensions.IdSetFromIds(ids)) .Entry .ToDictionary()); }
public IEnumerable <string> Existing(params string[] ids) { return(_innerClient .Existing(GrpcExtensions.IdSetFromIds(ids)) .Id .AsEnumerable()); }
private static Dictionary <string, StatusResult> ChangeFlagsInner( Func <ChangeFlagsRequest, StatusMap> changeAction, IEnumerable <Flag.Types.Reserved> reservedFlags, IEnumerable <string> customFlags, string[] ids) { var flags = reservedFlags .Select(x => new Flag { Reserved = x }) .Concat(customFlags.Select(x => new Flag { Custom = x })); return(changeAction( new ChangeFlagsRequest { Ids = GrpcExtensions.IdSetFromIds(ids), Flag = new FlagSet { Flag = { flags } } } ) .Entry .ToDictionary()); }
public Dictionary <string, ImportResult> ImportResult(params string[] ids) { return(_innerClient .ImportResult(GrpcExtensions.IdSetFromIds(ids)) .Entry .ToDictionary()); }
public byte[] Download(IArchiveType archiveType, params string[] ids) { var r = _innerClient.Download(new DownloadRequest { Format = new Archiver { Format = archiveType.Format, Type = archiveType.Type }, Ids = GrpcExtensions.IdSetFromIds(ids) }); var list = r.ResponseStream.ToListAsync().Result; return(list.SelectMany(x => x.Data.ToByteArray()).ToArray()); }
public async Task <IEnumerable <string> > WithFlagAsync(params string[] ids) { var withFlag = await _innerClient.WithFlagAsync(GrpcExtensions.IdSetFromIds(ids)); return(withFlag.Id.AsEnumerable()); }
public async Task <Dictionary <string, StatusResult> > ImportAsync(params string[] ids) { var statusMap = await _innerClient.ImportAsync(GrpcExtensions.IdSetFromIds(ids)); return(statusMap.Entry.ToDictionary()); }
public async Task <Dictionary <string, ImportResult> > ImportResultAsync(params string[] ids) { var importResult = await _innerClient.ImportResultAsync(GrpcExtensions.IdSetFromIds(ids)); return(importResult.Entry.ToDictionary()); }
public async Task <IEnumerable <string> > ExistingAsync(params string[] ids) { var idSet = await _innerClient.ExistingAsync(GrpcExtensions.IdSetFromIds(ids)); return(idSet.Id.AsEnumerable()); }