2using System.Diagnostics;
5using Newtonsoft.Json.Linq;
48 Debug.WriteLine(
"Warning: The JSON returned from server for a " +
49 $"{objectType.NiceTypeName()} contained an unexpected type field: " +
50 $"\"{APIType_Polymorphic.TypePropertyName}\": \"{typeName}\", " +
51 "which seems unnecessary, since this class is not polymorphic. " +
52 "This could be a sign that the server added polymorphism to a class " +
53 "without making the appropriate adjustments in the C# Client Library.");
55 Debug.WriteLine(
"Warning: The JSON returned from server for a " +
56 $"{objectType.NiceTypeName()} contained an unrecognized value in the " +
57 $"type field: \"{APIType_Polymorphic.TypePropertyName}\": \"{typeName}\". " +
58 "This could be a sign that the server added a new sub-type to a class " +
59 "without making the appropriate adjustments in the C# Client Library.");
73 $"{objectType.NiceTypeName()} sub-type: \"{typeName}\".");
75 "Could not create an instance of the abstract class or interface " +
76 objectType.NiceTypeName() +
", and the JSON object did not contain a " +
77 "_type property to determine what the correct sub-type is: " +
jObject);
Base class used by all types and resources.
Describes a collection of resources which can be listed.
Allows serializing and deserializing derived Analyze Re Resources to a target base type....
override T Create(Type objectType, JObject jObject)
Create a new instance of the requested resource type for deserialization of a JSON string.
Json converter helper class.
Utility for resolving types given only the types name (Useful for parsing ambiguous JSON objects).
static bool ResolveTypeByName(string typeName, out Type resolvedType, Type requiredBaseType=null)
Clever method that checks all assemblies in the application being compiled for the type referenced by...
Interface for polymorphic types on the server.
Interface shared by all object types and resources returned by the Analyze Re server.