public Task <Blob> ToBlob()
        {
            if (TempFileId.HasValue())
            {
                return(new FileUploadService().Bind(TempFileId));
            }

            Blob result;

            if (Action == BlobViewModelAction.Unchanged)
            {
                result = Blob.Unchanged();
            }
            else
            {
                result = Blob.Empty();
            }

            return(Task.FromResult(result));
        }
Exemple #2
0
        public Task <Blob> ToBlob()
        {
            if (TempFileId.HasValue())
            {
                return(Context.Current.GetService <IFileRequestService>().Bind(TempFileId));
            }

            Blob result;

            if (Action == BlobViewModelAction.Unchanged)
            {
                result = Blob.Unchanged();
            }
            else
            {
                result = Blob.Empty();
            }

            return(Task.FromResult(result));
        }