public void UploadDarFile(Stream stream, string submissionId = null, string accessToken = null)
        {
            var request = new UploadDarFileRequest {
                DarFile = ByteString.FromStream(stream)
            };

            if (!string.IsNullOrEmpty(submissionId))
            {
                request.SubmissionId = submissionId;
            }

            _packageManagementClient.WithAccess(accessToken).Dispatch(request, (c, r, co) => c.UploadDarFile(r, co));
        }
        public async Task UploadDarFileAsync(Stream stream, string submissionId = null, string accessToken = null)
        {
            var byteString = await ByteString.FromStreamAsync(stream);

            var request = new UploadDarFileRequest {
                DarFile = byteString
            };

            if (!string.IsNullOrEmpty(submissionId))
            {
                request.SubmissionId = submissionId;
            }

            await _packageManagementClient.WithAccess(accessToken).Dispatch(request, (c, r, co) => c.UploadDarFileAsync(r, co));
        }