Class DataStreamBase<TDataChannel>
Data stream base properties/methods.
Inheritance
System.Object
DataStreamBase<TDataChannel>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public abstract class DataStreamBase<TDataChannel> : Stream, IDataStream<TDataChannel>, IStream where TDataChannel : DataChannelBase<TDataChannel>
Type Parameters
Name | Description |
---|---|
TDataChannel |
Constructors
DataStreamBase()
Initializes a new instance of the DataStreamBase<TDataChannel> class.
Declaration
public DataStreamBase()
Properties
BytesReceived
Gets the number of bytes received.
Declaration
public long BytesReceived { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
BytesSent
Gets the number of bytes sent.
Declaration
public long BytesSent { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
CanonicalName
Gets the canonical name.
Declaration
[Obsolete("Will be removed in a future release.")]
public string CanonicalName { get; }
Property Value
Type | Description |
---|---|
System.String |
Channels
Gets the channels.
Declaration
public abstract TDataChannel[] Channels { get; }
Property Value
Type | Description |
---|---|
TDataChannel[] |
Direction
Gets the current direction.
Declaration
public override StreamDirection Direction { get; }
Property Value
Type | Description |
---|---|
StreamDirection |
Overrides
Info
Gets the data stream info.
Declaration
public DataStreamInfo Info { get; }
Property Value
Type | Description |
---|---|
DataStreamInfo |
Label
Gets a label that identifies this class.
Declaration
public override string Label { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
LocalDirection
Gets or sets the current direction.
Declaration
public override StreamDirection LocalDirection { get; set; }
Property Value
Type | Description |
---|---|
StreamDirection |
Overrides
MessagesReceived
Gets the number of messages received.
Declaration
public long MessagesReceived { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
MessagesSent
Gets the number of messages sent.
Declaration
public long MessagesSent { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
RemoteDirection
Gets or sets the current direction.
Declaration
public override StreamDirection RemoteDirection { get; }
Property Value
Type | Description |
---|---|
StreamDirection |
Overrides
Methods
AttachToChannel(TDataChannel)
Attaches a data channel to this stream (events and IDs).
Declaration
protected void AttachToChannel(TDataChannel channel)
Parameters
Type | Name | Description |
---|---|---|
TDataChannel | channel |
ChangeDirection(StreamDirection)
Changes this stream's direction
Declaration
public override Error ChangeDirection(StreamDirection newDirection)
Parameters
Type | Name | Description |
---|---|---|
StreamDirection | newDirection |
Returns
Type | Description |
---|---|
Error |
Overrides
ProcessStateChange()
Processes a state change.
Declaration
protected override void ProcessStateChange()
Overrides
ProcessStateLockChange()
Processes a state lock change.
Declaration
protected override void ProcessStateLockChange()
Overrides
RegisterDataReceived(Int32)
Registers that a data has been received.
Declaration
protected void RegisterDataReceived(int dataLength)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | dataLength | The data length. |
RegisterDataSent(Int32)
Registers that a data has been received.
Declaration
protected void RegisterDataSent(int dataLength)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | dataLength | The data length. |