/// <summary> /// Creates a default property (ex int Property{get;set;} /// </summary> /// <param name="Name">Name of the property</param> /// <param name="PropertyType">Type of the property</param> /// <param name="Attributes">Attributes for the property (special name, etc.)</param> /// <param name="GetMethodAttributes">Get method's attributes (public, private, etc.)</param> /// <param name="SetMethodAttributes">Set method's attributes (public, private, etc.)</param> /// <param name="Parameters">Parameter types</param> /// <returns>Property builder for the property</returns> public virtual IPropertyBuilder CreateDefaultProperty(string Name, Type PropertyType, PropertyAttributes Attributes = PropertyAttributes.SpecialName, MethodAttributes GetMethodAttributes = MethodAttributes.Public | MethodAttributes.Virtual, MethodAttributes SetMethodAttributes = MethodAttributes.Public | MethodAttributes.Virtual, List <Type> Parameters = null) { DefaultPropertyBuilder ReturnValue = new DefaultPropertyBuilder(this, Name, Attributes, GetMethodAttributes, SetMethodAttributes, PropertyType, Parameters); Properties.Add(ReturnValue); return(ReturnValue); }
/// <summary> /// Creates a default property (ex int Property{get;set;} /// </summary> /// <param name="Name">Name of the property</param> /// <param name="PropertyType">Type of the property</param> /// <param name="Attributes">Attributes for the property (special name, etc.)</param> /// <param name="GetMethodAttributes">Get method's attributes (public, private, etc.)</param> /// <param name="SetMethodAttributes">Set method's attributes (public, private, etc.)</param> /// <param name="Parameters">Parameter types</param> /// <returns>Property builder for the property</returns> public virtual IPropertyBuilder CreateDefaultProperty(string Name, Type PropertyType, PropertyAttributes Attributes = PropertyAttributes.SpecialName, MethodAttributes GetMethodAttributes = MethodAttributes.Public | MethodAttributes.Virtual, MethodAttributes SetMethodAttributes = MethodAttributes.Public | MethodAttributes.Virtual, IEnumerable<Type> Parameters = null) { DefaultPropertyBuilder ReturnValue = new DefaultPropertyBuilder(this, Name, Attributes, GetMethodAttributes, SetMethodAttributes, PropertyType, Parameters); Properties.Add(ReturnValue); return ReturnValue; }