예제 #1
0
 public override bool Equals(JOption other)
 {
     return(other != null &&
            other is JIndex item &&
            this.Index == item.Index &&
            base.Equals(other));
 }
예제 #2
0
 public override bool Equals(JOption other)
 {
     return(other != null &&
            other is JElement element &&
            this.Name == element.Name &&
            base.Equals(other));
 }
예제 #3
0
 public JIndex(JOption parent, int index)
     : base(parent)
 {
     //if (index < 0) {
     //    throw new IndexOutOfRangeException();
     //}
     this.Index = index;
 }
예제 #4
0
 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;
     }
 }
예제 #5
0
 protected internal JOption(JOption parent)
 {
     this.locker = parent?.locker ?? new object();
     this.parent = parent;
     this.path   = new Lazy <string>(GetPath);
 }
예제 #6
0
 public JElement(JOption parent, string name)
     : base(parent)
 {
     this.Name = name;
 }
예제 #7
0
파일: JConfig.cs 프로젝트: alex-volkow/Void
 private JConfig(JOption option)
 {
     this.root = option;
 }