static RemoteInstanceContainer() { AppDomain.CurrentDomain.DomainUnload += CurrentDomainUnload; RemotingTypeConverters.RegisterTypeConverter(new TypeToProtoConverter()); RemotingTypeConverters.RegisterTypeConverter(new DateTimeToProtoConverter()); RemotingTypeConverters.RegisterTypeConverter(new DateTimeArrayToProtoConverter()); RemotingTypeConverters.RegisterTypeConverter(new TimeSpanToProtoConverter()); }
private static void ProcessTypeConverters(string typeConverters) { var types = typeConverters.Split('|'); foreach (var type in types) { var inst = (ITypeToProtoConverter)Activator.CreateInstance(Type.GetType(type)); RemotingTypeConverters.RegisterTypeConverter(inst); } }