I have an pipeline that requires a usage of object. It’s kind of a tricky one, the item decides if it’s a container for items (a branch) or it’s a end item (a leaf). And it does that based on Items property.
So the case is: i need a pin group with default item object that is null
In case we have a leaf item, with items should not be assigned, this works:
public override void SetItems(
[Pin(PinGroupKind = Model.PinGroupKind.Collection, PinGroupDefaultCount = 1)]
Spread<object?> items
)
But as soon as we have more leafs and pin is not connected:
We already starting to allocate empty objects each Update call…
I try to use:
public override void SetItems(
[Pin(PinGroupKind = Model.PinGroupKind.Collection, PinGroupDefaultCount = 1)]
Spread<Optional<object>> items
)
But that results in:
Exception
EmitException: "D:\VVVV\__avalonia\VL.Avalonia\VL.Avalonia\help\template.vl.1.7.cs(196,157): error CS0103: The name '__pin_group_items_A10UrQ8EwdiMu0sb6dtb2W_22' does not exist in the current context"
StackTrace:
VL.Lang.Platforms.Roslyn.TargetCompilation+<>c__DisplayClass6_3 { internal System.ValueTuple<Microsoft.CodeAnalysis.PortableExecutableReference, VL.Core.RawAssembly> <InitializeAsync>g__Emit|5(bool includeSource, System.Threading.CancellationToken token, VL.Lang.Platforms.Roslyn.<>c__DisplayClass6_2& ) { ... } }
VL.Lang.Platforms.Roslyn.TargetCompilation+<>c__DisplayClass6_0 { internal VL.Lang.Platforms.Roslyn.ProjectCompilation <InitializeAsync>g__Build|0(VL.Lang.Platforms.Roslyn.ProjectBuildRequest projectBuildRequest) { ... } }
VL.Lang.Platforms.Roslyn.TargetCompilation+<>c__DisplayClass6_1+<<InitializeAsync>b__1>d { private virtual void MoveNext() { ... } }
System.Runtime.ExceptionServices.ExceptionDispatchInfo { public void Throw() { ... } }
System.Runtime.CompilerServices.TaskAwaiter { private static void ThrowForNonSuccess(System.Threading.Tasks.Task task) { ... } }
System.Runtime.CompilerServices.TaskAwaiter { private static void HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task task, System.Threading.Tasks.ConfigureAwaitOptions options) { ... } }
System.Runtime.CompilerServices.TaskAwaiter`1 { public TResult GetResult() { ... } }
VL.Lang.Platforms.Roslyn.TargetCompilation+<InitializeAsync>d__6 { private virtual void MoveNext() { ... } }
System.Runtime.ExceptionServices.ExceptionDispatchInfo { public void Throw() { ... } }
System.Runtime.CompilerServices.TaskAwaiter { private static void ThrowForNonSuccess(System.Threading.Tasks.Task task) { ... } }
System.Runtime.CompilerServices.TaskAwaiter { private static void HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task task, System.Threading.Tasks.ConfigureAwaitOptions options) { ... } }
System.Runtime.CompilerServices.TaskAwaiter`1 { public TResult GetResult() { ... } }
VL.Lang.Platforms.Roslyn.TargetCompilation+<CreateAsync>d__4 { private virtual void MoveNext() { ... } }
System.Runtime.ExceptionServices.ExceptionDispatchInfo { public void Throw() { ... } }
System.Runtime.CompilerServices.TaskAwaiter { private static void ThrowForNonSuccess(System.Threading.Tasks.Task task) { ... } }
System.Runtime.CompilerServices.TaskAwaiter { private static void HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task task, System.Threading.Tasks.ConfigureAwaitOptions options) { ... } }
System.Runtime.CompilerServices.TaskAwaiter`1 { public TResult GetResult() { ... } }
VL.Lang.Platforms.Roslyn.TargetCompilation+<WithCompilationAsync>d__43 { private virtual void MoveNext() { ... } }
System.Runtime.ExceptionServices.ExceptionDispatchInfo { public void Throw() { ... } }
System.Runtime.CompilerServices.TaskAwaiter { private static void ThrowForNonSuccess(System.Threading.Tasks.Task task) { ... } }
System.Runtime.CompilerServices.TaskAwaiter { private static void HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task task, System.Threading.Tasks.ConfigureAwaitOptions options) { ... } }
System.Runtime.CompilerServices.TaskAwaiter`1 { public TResult GetResult() { ... } }
VL.Lang.Platforms.Roslyn.TargetCompilation+<VL-Lang-Symbols-ITargetCompilation-WithCompilationAsync>d__44 { private virtual void MoveNext() { ... } }
System.Runtime.ExceptionServices.ExceptionDispatchInfo { public void Throw() { ... } }
System.Runtime.CompilerServices.TaskAwaiter { private static void ThrowForNonSuccess(System.Threading.Tasks.Task task) { ... } }
System.Runtime.CompilerServices.TaskAwaiter { private static void HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task task, System.Threading.Tasks.ConfigureAwaitOptions options) { ... } }
System.Runtime.CompilerServices.TaskAwaiter`1 { public TResult GetResult() { ... } }
VL.Model.VLSession+<CreateTargetCompilationAsync>d__150 { private virtual void MoveNext() { ... } }
System.Runtime.ExceptionServices.ExceptionDispatchInfo { public void Throw() { ... } }
System.Runtime.CompilerServices.TaskAwaiter { private static void ThrowForNonSuccess(System.Threading.Tasks.Task task) { ... } }
System.Runtime.CompilerServices.TaskAwaiter { private static void HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task task, System.Threading.Tasks.ConfigureAwaitOptions options) { ... } }
VL.Model.VLSession+<UpdateRuntimesAsync>d__149 { private virtual void MoveNext() { ... } }
System.Runtime.ExceptionServices.ExceptionDispatchInfo { public void Throw() { ... } }
System.Runtime.CompilerServices.TaskAwaiter { private static void ThrowForNonSuccess(System.Threading.Tasks.Task task) { ... } }
System.Runtime.CompilerServices.TaskAwaiter { private static void HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task task, System.Threading.Tasks.ConfigureAwaitOptions options) { ... } }
VL.Model.VLSession+<UpdateCompilationAsync>d__173 { private virtual void MoveNext() { ... } }
