mirror of
https://github.com/esiur/esiur-dotnet.git
synced 2025-06-27 05:23:13 +00:00
invoke
This commit is contained in:
12
Esiur/Core/AsyncChunk.cs
Normal file
12
Esiur/Core/AsyncChunk.cs
Normal 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>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
31
Esiur/Core/InvocationContext.cs
Normal file
31
Esiur/Core/InvocationContext.cs
Normal 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;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user