Exemple #1
0
        public Method(MethodInfo methodInfo)
        {
            string returnType = GenericTypeConverter.GetType(methodInfo.ReturnParameter.ParameterType);

            _name = AttributeBuilder.GetMethodsAtributes(methodInfo) + returnType + " " + methodInfo.Name;
            GetParams(methodInfo);
        }
Exemple #2
0
        private void GetParams(MethodInfo methodInfo)
        {
            string modificator = "";
            int    counter     = 1;

            ParameterInfo[] parameters = methodInfo.GetParameters();

            Name += "(";
            foreach (ParameterInfo parameter in parameters)
            {
                modificator = AttributeBuilder.GetParamsAtributes(parameter);
                Name       += (modificator + GenericTypeConverter.GetType(parameter.ParameterType) + " " + parameter.Name);
                if (counter != parameters.Length)
                {
                    Name += ", ";
                }
                counter++;
            }
            Name += ")";
        }
Exemple #3
0
 public Field(FieldInfo field)
 {
     _name = AttributeBuilder.GetFieldAtributes(field) + GenericTypeConverter.GetType(field.FieldType) + " " + field.Name;
 }
Exemple #4
0
 public Property(PropertyInfo property)
 {
     _name = AttributeBuilder.GetPropertyAtributes(property) + GenericTypeConverter.GetType(property.PropertyType) + " " + property.Name + AttributeBuilder.GetPropertyMethods(property);
 }