Class StreamWithMetadata
- Namespace
- Phoesion.Glow.SDK.Firefly
- Assembly
- Phoesion.Glow.SDK.Firefly.Abstractions.dll
public class StreamWithMetadata : IHasContentType, IHasHeaders
- Inheritance
-
object
StreamWithMetadata
- Implements
-
- Derived
-
Constructors
public StreamWithMetadata(Stream stream)
Parameters
stream
Stream
public StreamWithMetadata(Stream stream, string? contentType)
Parameters
stream
Stream
contentType
string
public StreamWithMetadata(Stream stream, string? contentType, string? fileName)
Parameters
stream
Stream
contentType
string
fileName
string
Properties
ContentLength
public long? ContentLength { get; set; }
Property Value
- long?
ContentType
public string? ContentType { get; set; }
Property Value
- string
public Dictionary<string, StringValues> Headers { get; }
Property Value
- Dictionary<string, StringValues>
public virtual Stream Stream { get; }
Property Value
- Stream
Methods
public StreamWithMetadata AsAttachment(string fileName = null)
Parameters
fileName
string
Returns
- StreamWithMetadata
public static StreamWithMetadata FromStream(Stream stream)
Parameters
stream
Stream
Returns
- StreamWithMetadata
public static StreamWithMetadata FromStream(Stream stream, string contentType)
Parameters
stream
Stream
contentType
string
Returns
- StreamWithMetadata
public StreamWithMetadata WithCacheControl(TimeSpan? maxAge)
Parameters
maxAge
TimeSpan?
Returns
- StreamWithMetadata
WithContentLength(long?)
public StreamWithMetadata WithContentLength(long? length)
Parameters
length
long?
Returns
- StreamWithMetadata
WithContentType(string)
public StreamWithMetadata WithContentType(string contentType)
Parameters
contentType
string
Returns
- StreamWithMetadata
public StreamWithMetadata WithHeader(string key, StringValues values)
Parameters
key
string
values
StringValues
Returns
- StreamWithMetadata
public StreamWithMetadata WithHeaders(IDictionary<string, StringValues> headers)
Parameters
headers
IDictionary<string, StringValues>
Returns
- StreamWithMetadata
Operators
public static explicit operator Stream(StreamWithMetadata stream)
Parameters
stream
StreamWithMetadata
Returns
- Stream
public static explicit operator StreamWithMetadata(Stream stream)
Parameters
stream
Stream
Returns
- StreamWithMetadata
public static explicit operator StreamWithMetadata((Stream Stream, string ContentType, string FileName) tuple)
Parameters
tuple
(Stream Stream, string ContentType, string FileName)
Returns
- StreamWithMetadata
public static explicit operator StreamWithMetadata((Stream Stream, string ContentType) tuple)
Parameters
tuple
(Stream Stream, string ContentType)
Returns
- StreamWithMetadata