Show / Hide Table of Contents

Class StreamMessage

Represents message which content is represented by .

Inheritance
Object
StreamTransferObject
StreamMessage
Implements
IDisposableMessage
IMessage
IDataTransferObject
IDisposable
Inherited Members
StreamTransferObject.IsReusable
StreamTransferObject.IDataTransferObject.Length
StreamTransferObject.IDataTransferObject.CopyToAsync(Stream, CancellationToken)
StreamTransferObject.IDataTransferObject.CopyToAsync(PipeWriter, CancellationToken)
StreamTransferObject.Dispose(Boolean)
Namespace: DotNext.Net.Cluster.Messaging
Assembly: DotNext.Net.Cluster.dll
Syntax
public class StreamMessage : StreamTransferObject, IDisposableMessage, IMessage, IDataTransferObject, IDisposable

Constructors

| Improve this Doc View Source

StreamMessage(Stream, Boolean, String, ContentType)

Initializes a new message.

Declaration
public StreamMessage(Stream content, bool leaveOpen, string name, ContentType type = null)
Parameters
Type Name Description
Stream content

The message content.

Boolean leaveOpen

true to leave the stream open after StreamMessage object is disposed; otherwise, false.

String name

The name of the message.

ContentType type

Media type of the message.

Properties

| Improve this Doc View Source

Name

Gets name of this message.

Declaration
public string Name { get; }
Property Value
Type Description
String
| Improve this Doc View Source

Type

Gets media type of this message.

Declaration
public ContentType Type { get; }
Property Value
Type Description
ContentType

Methods

| Improve this Doc View Source

CreateBufferedMessageAsync(IMessage, CancellationToken)

Creates copy of the original message stored in the managed heap.

Declaration
public static Task<StreamMessage> CreateBufferedMessageAsync(IMessage message, CancellationToken token = null)
Parameters
Type Name Description
IMessage message

The origin message.

CancellationToken token

The token that can be used to cancel asynchronous operation.

Returns
Type Description
Task<StreamMessage>

The message which stores the content of the original message in the memory.

Implements

IDisposableMessage
IMessage
IDataTransferObject
IDisposable

Extension Methods

AsyncLockAcquisition.AcquireLockAsync<T>(T, TimeSpan)
AsyncLockAcquisition.AcquireLockAsync<T>(T, CancellationToken)
AsyncLockAcquisition.AcquireReadLockAsync<T>(T, TimeSpan)
AsyncLockAcquisition.AcquireReadLockAsync<T>(T, CancellationToken)
AsyncLockAcquisition.AcquireWriteLockAsync<T>(T, TimeSpan)
AsyncLockAcquisition.AcquireWriteLockAsync<T>(T, CancellationToken)
AsyncLockAcquisition.AcquireUpgradeableReadLockAsync<T>(T, TimeSpan)
AsyncLockAcquisition.AcquireUpgradeableReadLockAsync<T>(T, CancellationToken)
DataTransferObject.ReadAsTextAsync(IDataTransferObject, Encoding, CancellationToken)
Messenger.ReadAsTextAsync(IMessage, CancellationToken)
ExpressionBuilder.Const<T>(T)
ObjectExtensions.GetUserData<T>(T)
ObjectExtensions.IsOneOf<T>(T, IEnumerable<T>)
ObjectExtensions.IsOneOf<T>(T, T[])
ObjectExtensions.Decompose<T, R1, R2>(T, Func<T, R1>, Func<T, R2>, out R1, out R2)
ObjectExtensions.Decompose<T, R1, R2>(T, ValueFunc<T, R1>, ValueFunc<T, R2>, out R1, out R2)
ObjectExtensions.Decompose<T, R1, R2>(T, Func<T, R1>, Func<T, R2>)
ObjectExtensions.Decompose<T, R1, R2>(T, ValueFunc<T, R1>, ValueFunc<T, R2>)
LockAcquisition.AcquireReadLock<T>(T)
LockAcquisition.AcquireReadLock<T>(T, TimeSpan)
LockAcquisition.AcquireWriteLock<T>(T)
LockAcquisition.AcquireWriteLock<T>(T, TimeSpan)
LockAcquisition.AcquireUpgradeableReadLock<T>(T)
LockAcquisition.AcquireUpgradeableReadLock<T>(T, TimeSpan)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX