-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Expand file tree
/
Copy pathSystem.Net.ServerSentEvents.cs
More file actions
47 lines (46 loc) · 3.2 KB
/
Copy pathSystem.Net.ServerSentEvents.cs
File metadata and controls
47 lines (46 loc) · 3.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// ------------------------------------------------------------------------------
// Changes to this file must follow the https://aka.ms/api-review process.
// ------------------------------------------------------------------------------
namespace System.Net.ServerSentEvents
{
public static partial class SseFormatter
{
public static System.Threading.Tasks.Task WriteAsync(System.Collections.Generic.IAsyncEnumerable<System.Net.ServerSentEvents.SseItem<string>> source, System.IO.Stream destination, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public static System.Threading.Tasks.Task WriteAsync<T>(System.Collections.Generic.IAsyncEnumerable<System.Net.ServerSentEvents.SseItem<T>> source, System.IO.Stream destination, System.Action<System.Net.ServerSentEvents.SseItem<T>, System.Buffers.IBufferWriter<byte>> itemFormatter, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
}
public delegate T SseItemParser<out T>(string eventType, System.ReadOnlySpan<byte> data);
public readonly partial struct SseItem<T>
{
private readonly T _Data_k__BackingField;
private readonly object _dummy;
private readonly int _dummyPrimitive;
public SseItem(T data, string? eventType = null) { throw null; }
public T Data { get { throw null; } }
public string? EventId { get { throw null; } init { } }
public string EventType { get { throw null; } }
public System.TimeSpan? ReconnectionInterval { get { throw null; } init { } }
}
public static partial class SseParser
{
public const string EventTypeDefault = "message";
public static System.Net.ServerSentEvents.SseParser<string> Create(System.IO.Stream sseStream) { throw null; }
public static System.Net.ServerSentEvents.SseParser<T> Create<T>(System.IO.Stream sseStream, System.Net.ServerSentEvents.SseItemParser<T> itemParser) { throw null; }
public static System.Net.ServerSentEvents.SseParser<T> Create<T>(System.IO.Stream sseStream, System.Net.ServerSentEvents.SseParserOptions<T> options) { throw null; }
}
public sealed partial class SseParserOptions<T>
{
public SseParserOptions(System.Net.ServerSentEvents.SseItemParser<T> itemParser) { }
public System.Net.ServerSentEvents.SseItemParser<T> ItemParser { get { throw null; } }
public int MaxBufferSize { get { throw null; } set { } }
}
public sealed partial class SseParser<T>
{
internal SseParser() { }
public string LastEventId { get { throw null; } }
public System.TimeSpan ReconnectionInterval { get { throw null; } }
public System.Collections.Generic.IEnumerable<System.Net.ServerSentEvents.SseItem<T>> Enumerate() { throw null; }
public System.Collections.Generic.IAsyncEnumerable<System.Net.ServerSentEvents.SseItem<T>> EnumerateAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
}
}