GetCodeType() public method

public GetCodeType ( ) : string
return 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);
        }