-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathGraphNode.cs
More file actions
36 lines (29 loc) · 1.08 KB
/
GraphNode.cs
File metadata and controls
36 lines (29 loc) · 1.08 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
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Website: https://www.blazor.zone or https://argozhang.github.io/
namespace BootstrapBlazor.Components;
public class GraphNode : IAsyncDisposable
{
private IJSObjectReference _graphNodeReference;
internal GraphNode(IJSObjectReference graphNodeReference)
{
_graphNodeReference = graphNodeReference;
}
/// <inheritdoc />
public ValueTask DisposeAsync()
{
return _graphNodeReference.DisposeAsync();
}
public ValueTask<T?> GetInputData<T>(int slotIndex)
{
return _graphNodeReference.InvokeAsync<T?>( "getInputData", slotIndex);
}
public ValueTask<T?> GetOutputData<T>(int slotIndex)
{
return _graphNodeReference.InvokeAsync<T?>( "getOutputData", slotIndex);
}
public ValueTask SetOutputData<T>(int slotIndex, T outputData)
{
return _graphNodeReference.InvokeVoidAsync( "setOutputData", slotIndex, outputData);
}
}