/// <summary>
        /// Create a synthetic method and add it to the given declaring type.
        /// </summary>
        public static XSyntheticMethodDefinition Create(XTypeDefinition declaringType, XSyntheticMethodFlags flags, string name, string scopeId, XTypeReference returnType, params XParameter[] parameters)
        {
            var method = new XSyntheticMethodDefinition(declaringType, flags, name, scopeId, returnType, parameters);

            declaringType.Add(method);
            return(method);
        }
 /// <summary>
 /// Add the given generated method to this type.
 /// </summary>
 internal override void Add(XSyntheticMethodDefinition method)
 {
     methods.Add(method);
     Reset();
 }