private static JToken GenerateMetadata(Type dataControllerType)
        {
            DataControllerDescription desc = DataControllerDescriptionTest.GetDataControllerDescription(dataControllerType);
            var metadata = DataControllerMetadataGenerator.GetMetadata(desc);

            JObject metadataValue = new JObject();

            foreach (var m in metadata)
            {
                metadataValue.Add(m.EncodedTypeName, m.ToJToken());
            }

            return(metadataValue);
        }
Пример #2
0
        public HttpResponseMessage Metadata()
        {
            var metadata = DataControllerMetadataGenerator.GetMetadata(this.GetType());

            return(Request.CreateResponse(HttpStatusCode.OK, metadata, "application/json"));
        }