/// <summary>
        /// Create a synthetic field and add it to the given declaring type.
        /// </summary>
        public static XSyntheticTypeDefinition Create(XModule module, XTypeDefinition declaringType, XSyntheticTypeFlags flags, string @namespace, string name, XTypeReference baseType)
        {
            var type = new XSyntheticTypeDefinition(module, declaringType, flags, @namespace, name, baseType);

            declaringType.Add(type);
            return(type);
        }
        /// <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);
        }
예제 #3
0
        /// <summary>
        /// Create a synthetic field and add it to the given declaring type.
        /// </summary>
        public static XSyntheticFieldDefinition Create(XTypeDefinition declaringType, XSyntheticFieldFlags flags, string name, XTypeReference fieldType, object initialValue = null)
        {
            var field = new XSyntheticFieldDefinition(declaringType, flags, name, fieldType, initialValue);

            declaringType.Add(field);
            return(field);
        }
예제 #4
0
        /// <summary>
        /// Create a synthetic field and add it to the given declaring type.
        /// </summary>
        public static XSyntheticTypeDefinition Create(XModule module, XTypeDefinition declaringType, XSyntheticTypeFlags flags, string @namespace, string name, XTypeReference baseType, string fullScopeId)
        {
            var type = new XSyntheticTypeDefinition(module, declaringType, flags, @namespace, name, baseType, fullScopeId);
            if(declaringType != null)
                declaringType.Add(type);

            module.Register(type);
            return type;
        }
예제 #5
0
        /// <summary>
        /// Create a synthetic field and add it to the given declaring type.
        /// </summary>
        public static XSyntheticTypeDefinition Create(XModule module, XTypeDefinition declaringType, XSyntheticTypeFlags flags, string @namespace, string name, XTypeReference baseType, string fullScopeId)
        {
            var type = new XSyntheticTypeDefinition(module, declaringType, flags, @namespace, name, baseType, fullScopeId);

            if (declaringType != null)
            {
                declaringType.Add(type);
            }

            module.Register(type);
            return(type);
        }
예제 #6
0
 /// <summary>
 /// Create a synthetic field and add it to the given declaring type.
 /// </summary>
 public static XSyntheticTypeDefinition Create(XModule module, XTypeDefinition declaringType, XSyntheticTypeFlags flags, string @namespace, string name, XTypeReference baseType)
 {
     var type = new XSyntheticTypeDefinition(module, declaringType, flags, @namespace, name, baseType);
     declaringType.Add(type);
     return type;
 }
예제 #7
0
 /// <summary>
 /// Create a synthetic field and add it to the given declaring type.
 /// </summary>
 public static XSyntheticFieldDefinition Create(XTypeDefinition declaringType, XSyntheticFieldFlags flags, string name, XTypeReference fieldType, object initialValue = null)
 {
     var field = new XSyntheticFieldDefinition(declaringType, flags, name, fieldType, initialValue);
     declaringType.Add(field);
     return field;
 }