|
@@ -23,18 +23,15 @@ namespace InABox.Clients
|
|
|
|
|
|
public static class ClientFactory
|
|
public static class ClientFactory
|
|
{
|
|
{
|
|
-
|
|
|
|
-
|
|
|
|
public static Dictionary<EmailType, Type> MailerTypes = new Dictionary<EmailType, Type>();
|
|
public static Dictionary<EmailType, Type> MailerTypes = new Dictionary<EmailType, Type>();
|
|
|
|
|
|
-
|
|
|
|
public static Guid UserGuid { get; private set; }
|
|
public static Guid UserGuid { get; private set; }
|
|
|
|
|
|
public static string UserID { get; private set; }
|
|
public static string UserID { get; private set; }
|
|
|
|
|
|
public static Guid UserSecurityID { get; private set; }
|
|
public static Guid UserSecurityID { get; private set; }
|
|
|
|
|
|
- public static Guid SessionID { get; set; }
|
|
|
|
|
|
+ public static Guid SessionID { get; private set; }
|
|
|
|
|
|
public static Guid DatabaseID { get; set; }
|
|
public static Guid DatabaseID { get; set; }
|
|
|
|
|
|
@@ -56,7 +53,7 @@ namespace InABox.Clients
|
|
|
|
|
|
public static int PINLength { get; } = 4;
|
|
public static int PINLength { get; } = 4;
|
|
|
|
|
|
- public static PushHandlers PushHandlers { get; set; } = new PushHandlers();
|
|
|
|
|
|
+ public static PushHandlers PushHandlers { get; private set; } = new PushHandlers();
|
|
|
|
|
|
public delegate void RequestErrorHandler(RequestException e);
|
|
public delegate void RequestErrorHandler(RequestException e);
|
|
|
|
|
|
@@ -67,26 +64,9 @@ namespace InABox.Clients
|
|
OnRequestError?.Invoke(e);
|
|
OnRequestError?.Invoke(e);
|
|
}
|
|
}
|
|
|
|
|
|
- private static bool IsSupported(Type t)
|
|
|
|
- {
|
|
|
|
- return true;
|
|
|
|
- //if (SupportedTypes == null)
|
|
|
|
- //{
|
|
|
|
- // try
|
|
|
|
- // {
|
|
|
|
- // SupportedTypes = new Client<User>().SupportedTypes();
|
|
|
|
- // }
|
|
|
|
- // catch (Exception e)
|
|
|
|
- // {
|
|
|
|
- // SupportedTypes = new String[] { };
|
|
|
|
- // }
|
|
|
|
- //}
|
|
|
|
- //return SupportedTypes.Contains(t.EntityName().Replace(".", "_"));
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
public static bool IsSupported<T>() where T : Entity, new()
|
|
public static bool IsSupported<T>() where T : Entity, new()
|
|
{
|
|
{
|
|
- return IsSupported(typeof(T));
|
|
|
|
|
|
+ return true;
|
|
}
|
|
}
|
|
|
|
|
|
public static bool IsSupported<T1, T2>() where T1 : Entity, new() where T2 : Entity, new()
|
|
public static bool IsSupported<T1, T2>() where T1 : Entity, new() where T2 : Entity, new()
|
|
@@ -119,12 +99,6 @@ namespace InABox.Clients
|
|
public static bool IsSupported(params Type[] types)
|
|
public static bool IsSupported(params Type[] types)
|
|
{
|
|
{
|
|
return true;
|
|
return true;
|
|
- //if (SupportedTypes == null)
|
|
|
|
- // SupportedTypes = new Client<User>().SupportedTypes();
|
|
|
|
- //bool result = true;
|
|
|
|
- //foreach (var type in types)
|
|
|
|
- // result = result && SupportedTypes.Contains(type.EntityName().Replace(".", "_"));
|
|
|
|
- //return result;
|
|
|
|
}
|
|
}
|
|
|
|
|
|
public static void SetClientType(Type type, Platform platform, string? version, params object[]? parameters)
|
|
public static void SetClientType(Type type, Platform platform, string? version, params object[]? parameters)
|