This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///<summary> Checks whether the JSON <paramref name="content"/> as <paramref name="resultType"/> contains the entities described in the given <paramref name="table"/> </summary> | |
private static string[] VerifyJsonContent(string content, string resultType, Table table) | |
{ | |
var matchingTypes = AppDomain.CurrentDomain.GetAssemblies().SelectMany(a => a.GetExportedTypes()) | |
.Where(t => (t.Namespace + "." + t.Name).EndsWith(resultType)).ToArray(); | |
if (matchingTypes.Length != 1) return new[] { string.Format("Cannot determine matching type by the name {0}; candidates: [{1}]", | |
resultType, string.Join(", ", matchingTypes.Select(t => t.Namespace + "." + t.Name))) }; | |
object message = null; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
using System.Net.Http; | |
using System.Net.Http.Formatting; | |
using System.Net.Http.Headers; | |
using System.Reflection; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace WebApi.Formatters |
OlderNewer