namespace Unity.VisualScripting { public class VariantKeyedCollection : VariantCollection, IKeyedCollection where TImplementation : TBase { public VariantKeyedCollection(IKeyedCollection implementation) : base(implementation) { this.implementation = implementation; } public TBase this[TKey key] => implementation[key]; public new IKeyedCollection implementation { get; private set; } public bool TryGetValue(TKey key, out TBase value) { TImplementation implementationValue; var result = implementation.TryGetValue(key, out implementationValue); value = implementationValue; return result; } public bool Contains(TKey key) { return implementation.Contains(key); } public bool Remove(TKey key) { return implementation.Remove(key); } TBase IKeyedCollection.this[int index] => implementation[index]; } }