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);
        }
Beispiel #2
0
 internal InitializerMethod(string name, Type returntype, InitializerObject parent, MethodMetadata meta)
 {
     Name       = name;
     ReturnType = returntype;
     _meta      = meta;
     _parent    = parent;
 }