Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

Need to expose blob metadata in GetAsync #1

Closed
RPM1984 opened this issue Aug 6, 2019 · 1 comment · Fixed by #4
Closed

Need to expose blob metadata in GetAsync #1

RPM1984 opened this issue Aug 6, 2019 · 1 comment · Fixed by #4
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@RPM1984
Copy link
Member

RPM1984 commented Aug 6, 2019

Problem

This code hides away the internal CloudBlockBlob metadata.

Such information might be useful for consumers, for example Properties.ContentType.

This came up because we were trying to assert that .AddAsync was being called with the correct content type in a test. To assert that, we needed to verify the metadata in .GetAsync, but it's being hidden away.

Suggestion

Instead of returning T in GetAsync, return a class that has T, but also the other attributes, in case the consumer wants it.

e.g

public class BlobData<T>
{
   public T Model { get; set; }
   public BlobProperties Properties { get; set; }
}

The consumer might need other metadata in CloudBlockBlob, but maybe we start with this?

@RPM1984 RPM1984 self-assigned this Aug 6, 2019
@RPM1984 RPM1984 added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Aug 6, 2019
@RPM1984 RPM1984 removed their assignment Aug 6, 2019
@PureKrome
Copy link
Contributor

Ok - interesting.

🤔 Ok - so how about this question first: What is the common use case? I would have thought (based on experience of just 1 person -- me .. so that's a crap data statistic) that most of the time people don't care/use this info. most of the time.

If that's the case, then keep the current methods (which make it easy to consume). and possibly create a second method (as in .. with a unique name) that returns the more complex type?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
2 participants