public HttpResponseMessage GetDataTypes() { _logWriter.Info(String.Format("Recieving request for Metadata Definition : {0}", "GetDataTypes")); var data = DataTypeBuilder.GetDataTypes().Where(x => !string.IsNullOrEmpty(x.Value.Tag)).Select(x => x.Value); return(Request.CreateResponse(HttpStatusCode.OK, data)); }
private string ValidateResource(MetadataDefinitionResource resource) { var sb = new StringBuilder(); if (DataTypeBuilder.Create(resource.DataType) != null) { return(sb.ToString()); } sb.AppendLine("Invalid DataType"); sb.AppendLine("Valid data type included"); foreach (var dataType in DataTypeBuilder.GetDataTypes()) { sb.Append(dataType.Value.Tag + ","); } return(sb.ToString()); }