C# Client Library
A C# Client Library for the AnalyzeRe REST API
Go to the documentation of this file.
1 using System.Reflection;
2 using System.Runtime.Serialization;
4 using AnalyzeRe.Utilities;
6 namespace AnalyzeRe.APITypes
7 {
10  {
12  [DataMember(Order = 1, Name = APIType_Polymorphic.TypePropertyName)]
13  public string type => TypeResolver.GetTypeNameForAPIType(GetType());
16  [IgnoreDataMember, InternalMember]
17  public static string APITypeName => TypeResolver.GetTypeNameForAPIType(
18  MethodBase.GetCurrentMethod().DeclaringType);
19  }
20 }
Stored resource that is polymorphic (has more than one sub-type).
Base class used by all persistent resources.
static string GetTypeNameForAPIType(Type type)
Gets the type name from the overriding type alias attribute or class name based using the supplied ty...
Definition: TypeResolver.cs:92
Base class used by all types and resources.
Interface for polymorphic types on the server.
Utility for resolving types given only the types name (Useful for parsing ambiguous JSON objects)...
Definition: TypeResolver.cs:13