The requested page is not available for the requested platform. You are viewing the content for Default platform.

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 Service metadata.

Namespace: DevExpress.Xpo

Assembly: DevExpress.Xpo.v18.2.Extensions.dll

Declaration

[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, Inherited = true, AllowMultiple = false)]
public class StreamAttribute :
    Attribute
<AttributeUsage(AttributeTargets.Property Or AttributeTargets.Field, Inherited:=True, AllowMultiple:=False)>
Public Class StreamAttribute
    Inherits Attribute
    Implements

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.

Inheritance

Object
Attribute
StreamAttribute

Implements

See Also