public static RemotableContent Get(Type t) { RemotableContent res; if (instances.TryGetValue(t, out res)) { return(res); } res = new RemotableContent(t); instances[t] = res; return(res); }
static Json.Node BuildObjectDescription(object obj, PerObjectParams param) { var type = obj.GetType(); var description = new Json.Object(); HashSet <string> allowedFields = param?.TryGet(type.FullName); foreach (var kv in RemotableContent.Get(type).Exported) { description.Add( kv.Key, BuildMember( kv.Value, obj, allowedFields?.Contains(kv.Key) ?? false)); } return(description); }
public void ManualRegisterMember(Type type, System.Reflection.MemberInfo info, Dictionary <string, object> moreInfo) { RemotableContent.Get(type).AddMember(info, moreInfo); }