2
0
mirror of https://github.com/esiur/esiur-dotnet.git synced 2025-06-27 05:23:13 +00:00
This commit is contained in:
2024-12-05 15:11:24 +03:00
parent 2bccebd419
commit ebc80b08cf
7 changed files with 98 additions and 20 deletions

12
Esiur/Core/AsyncChunk.cs Normal file
View File

@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Esiur.Core
{
// This interface is used to provide return type for templates and support chunk callbacks using IAsyncEnumerable feature of C# 8
public interface IAsyncChunk<T> : IAsyncEnumerable<object>
{
}
}

View File

@ -0,0 +1,31 @@
using Esiur.Net.IIP;
using System;
using System.Collections.Generic;
using System.Text;
namespace Esiur.Core
{
public class InvocationContext
{
private uint CallbackId;
public void Chunk(object value)
{
}
public void Progress(int value) {
}
public DistributedConnection Connection { get; internal set; }
internal InvocationContext(DistributedConnection connection, uint callbackId)
{
Connection = connection;
CallbackId = callbackId;
}
}
}