mirror of
https://github.com/esiur/esiur-dotnet.git
synced 2025-06-26 21:13:13 +00:00
Interfaces
This commit is contained in:
@ -217,6 +217,8 @@ namespace Esiur.Data
|
||||
return new RepresentationType(RepresentationTypeIdentifier.Resource, nullable);
|
||||
else if (type == typeof(IRecord) || type == typeof(Record))
|
||||
return new RepresentationType(RepresentationTypeIdentifier.Record, nullable);
|
||||
else if (type.IsInterface)
|
||||
return null; // other interfaces are not supported
|
||||
else if (type == typeof(Map<object, object>))
|
||||
return new RepresentationType(RepresentationTypeIdentifier.Map, nullable);
|
||||
else if (Codec.ImplementsInterface(type, typeof(IResource)))
|
||||
|
@ -5,7 +5,7 @@
|
||||
<Copyright>Ahmed Kh. Zamil</Copyright>
|
||||
<PackageProjectUrl>http://www.esiur.com</PackageProjectUrl>
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<Version>2.4.10</Version>
|
||||
<Version>2.4.11</Version>
|
||||
<RepositoryUrl>https://github.com/esiur/esiur-dotnet</RepositoryUrl>
|
||||
<Authors>Ahmed Kh. Zamil</Authors>
|
||||
<AssemblyVersion></AssemblyVersion>
|
||||
|
@ -765,6 +765,9 @@ public static class Warehouse
|
||||
/// <returns>Resource template.</returns>
|
||||
public static TypeTemplate GetTemplateByType(Type type)
|
||||
{
|
||||
if (!(type.IsClass || type.IsEnum))
|
||||
return null;
|
||||
|
||||
var baseType = ResourceProxy.GetBaseType(type);
|
||||
|
||||
if (baseType == typeof(IResource)
|
||||
|
Reference in New Issue
Block a user