Example #1
0
        public Thing(string name, Wrangler wrangler, Thing parent = null)
        {
            if (wrangler == null) throw new ArgumentNullException(nameof(wrangler));
            if (string.IsNullOrWhiteSpace(name))
                throw new ArgumentException("Value cannot be null or whitespace.", nameof(name));

            _wrangler = wrangler;
            Name = name;
            Parent = parent;
        }
Example #2
0
 public override bool TryGetMember(GetMemberBinder binder, out object result)
 {
     result = new Thing(binder.Name, _wrangler, this);
     return true;
 }