private static void AppendDecimalFacets(this StringBuilder sb, IEdmDecimalTypeReference type) { int? precision = type.Precision; if (precision.HasValue) { int? nullable = type.Precision; sb.AppendKeyValue("Precision", nullable.ToString()); } int? scale = type.Scale; if (scale.HasValue) { int? scale1 = type.Scale; sb.AppendKeyValue("Scale", scale1.ToString()); } }
private static void AppendBinaryFacets(this StringBuilder sb, IEdmBinaryTypeReference type) { string str; bool? isFixedLength = type.IsFixedLength; sb.AppendKeyValue("FixedLength", isFixedLength.ToString()); if (!type.IsUnbounded) { int? maxLength = type.MaxLength; if (!maxLength.HasValue) { return; } } StringBuilder stringBuilder = sb; string str1 = "MaxLength"; if (type.IsUnbounded) { str = "Max"; } else { int? nullable = type.MaxLength; str = nullable.ToString(); } stringBuilder.AppendKeyValue(str1, str); }
private static void AppendSpatialFacets(this StringBuilder sb, IEdmSpatialTypeReference type) { sb.AppendKeyValue(EdmConstants.FacetName_Srid, type.SpatialReferenceIdentifier != null ? type.SpatialReferenceIdentifier.ToString() : EdmConstants.Value_SridVariable); }
private static void AppendDecimalFacets(this StringBuilder sb, IEdmDecimalTypeReference type) { if (type.Precision != null) { sb.AppendKeyValue(EdmConstants.FacetName_Precision, type.Precision.ToString()); } if (type.Scale != null) { sb.AppendKeyValue(EdmConstants.FacetName_Scale, type.Scale.ToString()); } }
private static void AppendStringFacets(this StringBuilder sb, IEdmStringTypeReference type) { if (type.IsFixedLength != null) { sb.AppendKeyValue(EdmConstants.FacetName_FixedLength, type.IsFixedLength.ToString()); } if (type.IsUnbounded == true || type.MaxLength != null) { sb.AppendKeyValue(EdmConstants.FacetName_MaxLength, (type.IsUnbounded) ? EdmConstants.Value_Max : type.MaxLength.ToString()); } if (type.IsUnicode != null) { sb.AppendKeyValue(EdmConstants.FacetName_Unicode, type.IsUnicode.ToString()); } if (type.Collation != null) { sb.AppendKeyValue(EdmConstants.FacetName_Collation, type.Collation.ToString()); } }
private static void AppendBinaryFacets(this StringBuilder sb, IEdmBinaryTypeReference type) { sb.AppendKeyValue(EdmConstants.FacetName_FixedLength, type.IsFixedLength.ToString()); if (type.IsUnbounded || type.MaxLength != null) { sb.AppendKeyValue(EdmConstants.FacetName_MaxLength, (type.IsUnbounded) ? EdmConstants.Value_Max : type.MaxLength.ToString()); } }
private static void AppendTemporalFacets(this StringBuilder sb, IEdmTemporalTypeReference type) { int? precision = type.Precision; if (precision.HasValue) { int? nullable = type.Precision; sb.AppendKeyValue("Precision", nullable.ToString()); } }
private static void AppendStringFacets(this StringBuilder sb, IEdmStringTypeReference type) { bool? isUnicode; bool? nullable; string str; bool? isFixedLength = type.IsFixedLength; if (isFixedLength.HasValue) { bool? isFixedLength1 = type.IsFixedLength; sb.AppendKeyValue("FixedLength", isFixedLength1.ToString()); } if (!type.IsUnbounded) { int? maxLength = type.MaxLength; if (!maxLength.HasValue) { isUnicode = type.IsUnicode; if (isUnicode.HasValue) { nullable = type.IsUnicode; sb.AppendKeyValue("Unicode", nullable.ToString()); } if (type.Collation != null) { sb.AppendKeyValue("Collation", type.Collation.ToString()); } return; } } StringBuilder stringBuilder = sb; string str1 = "MaxLength"; if (type.IsUnbounded) { str = "Max"; } else { int? maxLength1 = type.MaxLength; str = maxLength1.ToString(); } stringBuilder.AppendKeyValue(str1, str); isUnicode = type.IsUnicode; if (isUnicode.HasValue) { nullable = type.IsUnicode; sb.AppendKeyValue("Unicode", nullable.ToString()); } if (type.Collation != null) { sb.AppendKeyValue("Collation", type.Collation.ToString()); } }