The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
The page you are viewing does not exist in the .NET Standard 2.0+ platform documentation. This link will take you to the parent topic of the current section.

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.v19.1.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

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