示例#1
0
 static RemoteInstanceContainer()
 {
     AppDomain.CurrentDomain.DomainUnload += CurrentDomainUnload;
     RemotingTypeConverters.RegisterTypeConverter(new TypeToProtoConverter());
     RemotingTypeConverters.RegisterTypeConverter(new DateTimeToProtoConverter());
     RemotingTypeConverters.RegisterTypeConverter(new DateTimeArrayToProtoConverter());
     RemotingTypeConverters.RegisterTypeConverter(new TimeSpanToProtoConverter());
 }
示例#2
0
        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);
            }
        }