GetCodeType() публичный Метод

public GetCodeType ( ) : string
Результат string
Пример #1
0
 private string GetPropertyValueAccessorMethod(PropertyInfo property)
 {
     var accessorMethod = "SingleOrDefault()";
     if (property.BindedType != null)
         accessorMethod = string.Format("SingleOrDefault() ?? new Null{0}()", property.GetCodeType());
     if (property.IsList)
         accessorMethod = "ToList()";
     return accessorMethod;
 }
Пример #2
0
        private static string GetParsedPropertyValue(PropertyInfo property, string variableName)
        {
            var valueToParse = variableName + ".Value";

            return string.Format("string.IsNullOrEmpty({0}) ? ({1})null : {2}",
                valueToParse,
                property.GetCodeType(),
                TypeUtils.GetParsableType(property.XmlType).ConstructParseCall(valueToParse));
        }
Пример #3
0
        private static string GetParsedPropertyValue(PropertyInfo property, string variableName)
        {
            var valueToParse = variableName + ".Value";

            return(string.Format("string.IsNullOrEmpty({0}) ? ({1})null : {2}",
                                 valueToParse,
                                 property.GetCodeType(),
                                 TypeUtils.GetParsableType(property.XmlType).ConstructParseCall(valueToParse)));
        }
Пример #4
0
        private string GetPropertyValueAccessorMethod(PropertyInfo property)
        {
            var accessorMethod = "SingleOrDefault()";

            if (property.BindedType != null)
            {
                accessorMethod = string.Format("SingleOrDefault() ?? new Null{0}()", property.GetCodeType());
            }
            if (property.IsList)
            {
                accessorMethod = "ToList()";
            }
            return(accessorMethod);
        }