namespace Jint.Tests.Runtime.Domain { public class Company : ICompany, IComparable { private string _name; private readonly Dictionary _dictionary = new Dictionary() { {"key", "value"} }; public Company(string name) { _name = name; } string ICompany.Name { get => _name; set => _name = value; } string ICompany.this[string key] { get => _dictionary[key]; set => _dictionary[key] = value; } public string Item => "item thingie"; int IComparable.CompareTo(ICompany other) { return string.Compare(_name, other.Name, StringComparison.CurrentCulture); } public IEnumerable GetNameChars() { foreach (var c in _name) { yield return c; } } } }