IEngineDictionary.cs 471 B

12345678910111213141516171819
  1. using System.Diagnostics.CodeAnalysis;
  2. using System.Runtime.CompilerServices;
  3. // ReSharper disable once CheckNamespace
  4. namespace Jint;
  5. /// <summary>
  6. /// Contract for custom dictionaries that Jint uses.
  7. /// </summary>
  8. internal interface IEngineDictionary<in TKey, TValue>
  9. {
  10. int Count { get; }
  11. ref TValue this[TKey name] { get; }
  12. public ref TValue GetValueRefOrNullRef(TKey key);
  13. public ref TValue GetValueRefOrAddDefault(TKey key, out bool exists);
  14. }