mirror of
https://github.com/StockSharp/StockSharp.git
synced 2026-12-04 08:32:23 +00:00
Fix.Core and Fix.Dialects arrive from the closed apps repository. They were only there because Fix.Core referenced the closed Licensing project for a single licence check; that check is gone, and with it the reason to keep the FIX protocol out of the open source tree. They are the framework, not a venue - the FIX connector itself goes to the Connectors repository and references these two from here, the same way every connector already references Messages and Media.Names. The obfuscation stub include that both carried is dropped: it names a file at the root of the apps repository, and open sources are not obfuscated. Both build.
102 lines
3.6 KiB
C#
102 lines
3.6 KiB
C#
namespace StockSharp.Fix.Native;
|
|
|
|
/// <summary>
|
|
/// The interface describing the recorder of data in the FIX protocol format.
|
|
/// </summary>
|
|
public interface IFixWriter : IFixBase
|
|
{
|
|
/// <summary>
|
|
/// Last written tag.
|
|
/// </summary>
|
|
FixTags LastTag { get; }
|
|
|
|
/// <summary>
|
|
/// Get data log.
|
|
/// </summary>
|
|
/// <returns>Data log.</returns>
|
|
string FlushDump();
|
|
|
|
/// <summary>
|
|
/// Flushes the stream asynchronously.
|
|
/// </summary>
|
|
/// <param name="cancellationToken"><see cref="CancellationToken"/></param>
|
|
/// <returns><see cref="Task"/></returns>
|
|
Task FlushAsync(CancellationToken cancellationToken);
|
|
|
|
/// <summary>
|
|
/// Write tag.
|
|
/// </summary>
|
|
/// <param name="tag">Tag.</param>
|
|
/// <param name="cancellationToken">Cancellation token.</param>
|
|
ValueTask WriteAsync(FixTags tag, CancellationToken cancellationToken);
|
|
|
|
/// <summary>
|
|
/// To record the <see cref="bool"/> value.
|
|
/// </summary>
|
|
/// <param name="value"><see cref="bool"/> value.</param>
|
|
/// <param name="cancellationToken">Cancellation token.</param>
|
|
ValueTask WriteAsync(bool value, CancellationToken cancellationToken);
|
|
|
|
/// <summary>
|
|
/// To record the <see cref="int"/> value.
|
|
/// </summary>
|
|
/// <param name="value"><see cref="int"/> value.</param>
|
|
/// <param name="cancellationToken">Cancellation token.</param>
|
|
ValueTask WriteAsync(int value, CancellationToken cancellationToken);
|
|
|
|
/// <summary>
|
|
/// To record the <see cref="long"/> value.
|
|
/// </summary>
|
|
/// <param name="value"><see cref="long"/> value.</param>
|
|
/// <param name="cancellationToken">Cancellation token.</param>
|
|
ValueTask WriteAsync(long value, CancellationToken cancellationToken);
|
|
|
|
/// <summary>
|
|
/// To record the <see cref="decimal"/> value.
|
|
/// </summary>
|
|
/// <param name="value"><see cref="decimal"/> value.</param>
|
|
/// <param name="cancellationToken">Cancellation token.</param>
|
|
ValueTask WriteAsync(decimal value, CancellationToken cancellationToken);
|
|
|
|
/// <summary>
|
|
/// To record the <see cref="DateTime"/> value.
|
|
/// </summary>
|
|
/// <param name="value"><see cref="DateTime"/> value.</param>
|
|
/// <param name="parser">Time parser. Required if data will be transferred as string.</param>
|
|
/// <param name="cancellationToken">Cancellation token.</param>
|
|
ValueTask WriteAsync(DateTime value, FastDateTimeParser parser, CancellationToken cancellationToken);
|
|
|
|
/// <summary>
|
|
/// To record the <see cref="TimeSpan"/> value.
|
|
/// </summary>
|
|
/// <param name="value"><see cref="TimeSpan"/> value.</param>
|
|
/// <param name="parser">Time parser. Required if data will be transferred as string.</param>
|
|
/// <param name="cancellationToken">Cancellation token.</param>
|
|
ValueTask WriteAsync(TimeSpan value, FastTimeSpanParser parser, CancellationToken cancellationToken);
|
|
|
|
/// <summary>
|
|
/// To record the <see cref="string"/> value.
|
|
/// </summary>
|
|
/// <param name="value"><see cref="string"/> value.</param>
|
|
/// <param name="cancellationToken">Cancellation token.</param>
|
|
ValueTask WriteAsync(string value, CancellationToken cancellationToken);
|
|
|
|
/// <summary>
|
|
/// To record the <see cref="char"/> value.
|
|
/// </summary>
|
|
/// <param name="value"><see cref="char"/> value.</param>
|
|
/// <param name="cancellationToken">Cancellation token.</param>
|
|
ValueTask WriteAsync(char value, CancellationToken cancellationToken);
|
|
|
|
/// <summary>
|
|
/// To record an array of bytes.
|
|
/// </summary>
|
|
/// <param name="buffer">Bytes buffer.</param>
|
|
/// <param name="cancellationToken">Cancellation token.</param>
|
|
ValueTask WriteBytesAsync(ReadOnlyMemory<byte> buffer, CancellationToken cancellationToken);
|
|
|
|
/// <summary>
|
|
/// Clear state.
|
|
/// </summary>
|
|
void ClearState();
|
|
} |