Out with MagicOnion, in with LiteNetLib

Removed MagicOnion
Added LiteNetLib
Created client and server abstractions
Fixed serialization bugs
This commit is contained in:
hyperion51 2020-03-24 14:36:22 +00:00
commit e96146b7bb
869 changed files with 59401 additions and 16812 deletions

View file

@ -0,0 +1,31 @@
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using Newtonsoft.Json.Linq;
namespace RethinkDb.Driver.Ast
{
/// <summary>
/// Extension helpers for working with the AST.
/// </summary>
public static class ExtensionHelper
{
internal static JObject ToJObject(this object anonType)
{
return anonType == null ? null : JObject.FromObject(anonType);
}
internal static IDictionary<string, object> ToDict(this object anonType)
{
return anonType == null ? null : PropertyHelper.ObjectToDictionary(anonType);
}
/// <summary>
/// Uses a collection as parameters for a method call.
/// </summary>
/// <param name="args">Same as calling params object[] overload. Instead of specifying each param, ICollection can be used for convenience.</param>
public static object[] AsParams<T>(this ICollection<T> args)
{
return args.OfType<object>().ToArray();
}
}
}