public override bool Equals(JOption other) { return(other != null && other is JIndex item && this.Index == item.Index && base.Equals(other)); }
public override bool Equals(JOption other) { return(other != null && other is JElement element && this.Name == element.Name && base.Equals(other)); }
public JIndex(JOption parent, int index) : base(parent) { //if (index < 0) { // throw new IndexOutOfRangeException(); //} this.Index = index; }
bool IReadOnlyDictionary <string, JOption> .TryGetValue(string key, out JOption value) { lock (this.locker) { value = GetElement() is IDictionary <string, JToken>?this[key] : new JElement(this, key); return(!value.IsNull); //if (GetElement() is IDictionary<string, JToken>) { // value = this[key]; // return !value.IsNull; //} //return false; } }
protected internal JOption(JOption parent) { this.locker = parent?.locker ?? new object(); this.parent = parent; this.path = new Lazy <string>(GetPath); }
public JElement(JOption parent, string name) : base(parent) { this.Name = name; }
private JConfig(JOption option) { this.root = option; }