Esempio n. 1
0
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            Type   typeInfo     = (Type)value;
            string TypeInfoName = null;

            if (typeInfo.IsPublic)
            {
                TypeInfoName += "public ";
            }
            else
            {
                TypeInfoName += "private ";
            }
            if (typeInfo.IsAbstract)
            {
                TypeInfoName += "abstract ";
            }
            if (typeInfo.IsSealed)
            {
                TypeInfoName += "sealed ";
            }
            if (typeInfo.IsClass)
            {
                TypeInfoName += "class ";
            }
            if (typeInfo.IsInterface)
            {
                TypeInfoName += "interface ";
            }
            TypeInfoName += InfoType.GetTypeName(typeInfo);
            return(TypeInfoName);
        }
Esempio n. 2
0
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            PropertyInfo propertyInfo     = (PropertyInfo)value;
            string       PropertyInfoName = null;

            PropertyInfoName += InfoType.GetTypeName(propertyInfo.PropertyType) + " " + propertyInfo.Name;
            return(PropertyInfoName);
        }
Esempio n. 3
0
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            FieldInfo fieldInfo     = (FieldInfo)value;
            string    FieldInfoName = null;

            if (fieldInfo.IsPublic)
            {
                FieldInfoName += "public ";
            }
            else
            {
                FieldInfoName += "private ";
            }
            if (fieldInfo.IsStatic)
            {
                FieldInfoName += "static ";
            }
            FieldInfoName += InfoType.GetTypeName(fieldInfo.FieldType) + " " + fieldInfo.Name;
            return(FieldInfoName);
        }
Esempio n. 4
0
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            MethodInfo methodInfo     = (MethodInfo)value;
            string     MethodInfoName = null;

            if (methodInfo.IsPublic)
            {
                MethodInfoName += "public ";
            }
            else
            {
                MethodInfoName += "private ";
            }

            if (methodInfo.IsStatic)
            {
                MethodInfoName += "static ";
            }
            if (methodInfo.IsAbstract)
            {
                MethodInfoName += "abstract ";
            }
            if (methodInfo.IsVirtual)
            {
                MethodInfoName += "virtual ";
            }
            MethodInfoName += InfoType.GetTypeName(methodInfo.ReturnType) + " " + methodInfo.Name;
            MethodInfoName += "(";
            ParameterInfo[] Parametrs = methodInfo.GetParameters();
            foreach (ParameterInfo argument in Parametrs)
            {
                MethodInfoName += InfoType.GetTypeName(argument.ParameterType) + ' ' + argument.Name + ',';
            }
            if (Parametrs.Count() > 0)
            {
                MethodInfoName = MethodInfoName.Remove(MethodInfoName.Length - 1);
            }
            ;
            MethodInfoName += ")";
            return(MethodInfoName);
        }