protected InitializerMethod Register(string methodname, Type returntype, MethodMetadata meta)
        {
            if (methodname == null)
            {
                throw new ArgumentNullException(nameof(methodname));
            }
            if (meta == null)
            {
                throw new ArgumentNullException(nameof(meta));
            }
            if (_properties.ContainsKey(methodname))
            {
                throw new ArgumentException();
            }
            InitializerMethod method = new InitializerMethod(methodname, returntype, this, meta);

            _methods.Add(methodname, method);
            return(method);
        }
 public ResourceContent()
 {
     _resource  = new Dictionary <string, object>();
     _addmethod = Register("add", null, new MethodMetadata(Add, typeof(string), typeof(object)));
 }