Skip to content

Commit 93de28a

Browse files
authored
Merge pull request #10 from Custom-Extension-Works/asyncCallList
Add call list and async call list
2 parents 541b91b + a2babb4 commit 93de28a

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

ProjectObsidian.SourceGenerators/BindingGenerator.cs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,15 @@ public override void VisitFieldDeclaration(FieldDeclarationSyntax node)
228228
TypedFieldDetection(type, name, "ValueOutput", "global::FrooxEngine.ProtoFlux.NodeValueOutput<{1}>", _outputCount);
229229

230230
//impulses
231-
if (!UntypedFieldDetection(type, name, "AsyncCall", "global::FrooxEngine.SyncRef<global::FrooxEngine.ProtoFlux.INodeOperation>", _impulseCount))
231+
if (type == "AsyncCall")
232+
{
233+
UntypedFieldDetection(type, name, "AsyncCall", "global::FrooxEngine.SyncRef<global::FrooxEngine.ProtoFlux.INodeOperation>", _impulseCount);
234+
}
235+
else if (type == "Call")
236+
{
232237
UntypedFieldDetection(type, name, "Call", "global::FrooxEngine.SyncRef<global::FrooxEngine.ProtoFlux.ISyncNodeOperation>", _impulseCount);
238+
}
239+
233240
UntypedFieldDetection(type, name, "Continuation", "global::FrooxEngine.SyncRef<global::FrooxEngine.ProtoFlux.INodeOperation>", _impulseCount);
234241
UntypedFieldDetection(type, name, "AsyncResumption", "global::FrooxEngine.SyncRef<global::FrooxEngine.ProtoFlux.INodeOperation>", _impulseCount);
235242

@@ -257,6 +264,13 @@ public override void VisitFieldDeclaration(FieldDeclarationSyntax node)
257264
UntypedFieldDetection(type, name, "AsyncOperationList", "global::FrooxEngine.SyncList<global::FrooxEngine.ProtoFlux.AsyncNodeOperation>", _operationListCount);
258265
UntypedFieldDetection(type, name, "SyncOperationList", "global::FrooxEngine.SyncList<global::FrooxEngine.ProtoFlux.SyncNodeOperation>", _operationListCount);
259266

267+
268+
//call lists
269+
if (type == "CallList")
270+
UntypedFieldDetection(type, name, "CallList", "global::FrooxEngine.SyncRefList<global::FrooxEngine.ProtoFlux.ISyncNodeOperation>", _impulseListCount);
271+
else
272+
UntypedFieldDetection(type, name, "AsyncCallList", "global::FrooxEngine.SyncRefList<global::FrooxEngine.ProtoFlux.INodeOperation>", _impulseListCount);
273+
260274
base.VisitFieldDeclaration(node);
261275
}
262276
public override void VisitPropertyDeclaration(PropertyDeclarationSyntax node)

0 commit comments

Comments
 (0)