StreamAttribute Class
Applied to fields or a properties of an XPO persistent class. Specifies that the target string or byte[] property/field is a stream, when generating OData v3 Service metadata.
Namespace: DevExpress.Xpo
Assembly: DevExpress.Xpo.v24.2.Extensions.dll
Declaration
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, Inherited = true, AllowMultiple = false)]
public class StreamAttribute :
Attribute
Remarks
The StreamAttribute allows you to specify the stream name and content type, using the name and contentType parameters.
If you do not want to modify the target class source, you can override the SetStreamContentType and SetNamedStreamData methods in the XpoContext descendant. Note that the StreamAttributeattribute has a higher priority than overridden XpoContext methods.
By default, only the byte[] properties are considered as streams. Their default content type is “application/streamingmedia”. You can change this behavior by overriding the XpoContext.ShowLargePropertyAsNamedStream method.