Show / Hide Table of Contents

Class StreamMessage

Represents message which content is represented by Stream.

Inheritance
Object
StreamMessage
Implements
IDisposableMessage
IMessage
IDataTransferObject
IDisposable
IAsyncDisposable
Namespace: DotNext.Net.Cluster.Messaging
Assembly: DotNext.Net.Cluster.dll
Syntax
public class StreamMessage : StreamTransferObject, IDisposableMessage, IMessage, IDataTransferObject, IDisposable, IAsyncDisposable

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.

| Improve this Doc View Source

StreamMessage(String, ContentType, Int32, Boolean)

Initializes a new empty message of predefined size.

Declaration
public StreamMessage(string name, ContentType type, int size = 1024, bool growable = true)
Parameters
Type Name Description
String name

The name of the message.

ContentType type

Media type of the message.

Int32 size

The initial size of the message, in bytes.

Boolean growable

true if the size is not fixed and can be expanded if necessary; false to use strictly limited memory size.

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

Implements

IDisposableMessage
IMessage
IDataTransferObject
System.IDisposable
System.IAsyncDisposable

Extension Methods

Messenger.ReadAsTextAsync(IMessage, CancellationToken)
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)
ObjectExtensions.GetUserData<T>(T)
ObjectExtensions.IsOneOf<T>(T, IEnumerable<T>)
ObjectExtensions.IsOneOf<T>(T, T[])
ObjectExtensions.Decompose<T, TResult1, TResult2>(T, Func<T, TResult1>, Func<T, TResult2>, out TResult1, out TResult2)
ObjectExtensions.Decompose<T, TResult1, TResult2>(T, ValueFunc<T, TResult1>, ValueFunc<T, TResult2>, out TResult1, out TResult2)
ObjectExtensions.Decompose<T, TResult1, TResult2>(T, Func<T, TResult1>, Func<T, TResult2>)
ObjectExtensions.Decompose<T, TResult1, TResult2>(T, ValueFunc<T, TResult1>, ValueFunc<T, TResult2>)
ObjectExtensions.As<T>(T)
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)
ExpressionBuilder.Const<T>(T)
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX