Example #1
0
        private NeoValue GetMetaMethod(string name, params NeoValue[] others)
        {
            var key = NeoString.ValueOf(name);

            if (MetaObject != null && MetaObject.data.ContainsKey(key))
            {
                return(MetaObject.data[key]);
            }

            foreach (var v in others)
            {
                if (!v.IsObject)
                {
                    continue;
                }
                var obj = (NeoObject)v;
                if (obj.MetaObject != null && obj.MetaObject.data.ContainsKey(key))
                {
                    return(obj.MetaObject.data[key]);
                }
            }

            return(null);
        }
Example #2
0
 public virtual NeoValue Concat(NeoValue other) => NeoString.ValueOf($"{ToNeoString()}{other.ToNeoString()}");