public static T Unserialize <T>(byte[] data, HproseMode mode) { MemoryStream stream = new MemoryStream(data); HproseReader reader = new HproseReader(stream, mode); return(reader.Unserialize <T>()); }
public static object Unserialize(byte[] data, HproseMode mode, Type type) { MemoryStream stream = new MemoryStream(data); HproseReader reader = new HproseReader(stream, mode); return(reader.Unserialize(type)); }
public static new HproseClient Create(string uri, HproseMode mode) { Uri u = new Uri(uri); if (u.Scheme != "http" && u.Scheme != "https") { throw new HproseException("This client doesn't support " + u.Scheme + " scheme."); } return new HproseUnityHttpClient(uri, mode); }
protected HproseClient(string uri, HproseMode mode) { if (uri != null) { UseService(uri); } this.mode = mode; }
public static MemoryStream Serialize(object obj, HproseMode mode) { MemoryStream stream = new MemoryStream(); HproseWriter writer = new HproseWriter(stream, mode); writer.Serialize(obj); return(stream); }
public static new HproseClient Create(string uri, HproseMode mode) { Uri u = new Uri(uri); if (u.Scheme != "http" && u.Scheme != "https") { throw new HproseException("This client doesn't support " + u.Scheme + " scheme."); } return(new HproseUnityHttpClient(uri, mode)); }
public static HproseClient Create(string uri, HproseMode mode) { Uri u = new Uri(uri); #if (dotNET10 || dotNET11 || dotNETCF10) HproseClientCreator creator = (HproseClientCreator)clientFactories[u.Scheme]; #else HproseClientCreator creator = null; clientFactories.TryGetValue(u.Scheme, out creator); #endif if (creator != null) { return(creator(uri, mode)); } throw new HproseException("The " + u.Scheme + " client isn't implemented."); }
protected static ObjectUnserializer Get(HproseMode mode, Type type, string[] names, CreateObjectUnserializerDelegate createObjectUnserializer) { CacheKey key = new CacheKey(mode, type, names); ObjectUnserializer unserializer = null; try { #if (dotNET35 || dotNET4) unserializersCacheLock.EnterReadLock(); #else unserializersCacheLock.AcquireReaderLock(-1); #endif if (unserializersCache.TryGetValue(key, out unserializer)) { return(unserializer); } } finally { #if (dotNET35 || dotNET4) unserializersCacheLock.ExitReadLock(); #else unserializersCacheLock.ReleaseReaderLock(); #endif } try { #if (dotNET35 || dotNET4) unserializersCacheLock.EnterWriteLock(); #else unserializersCacheLock.AcquireWriterLock(-1); #endif if (unserializersCache.TryGetValue(key, out unserializer)) { return(unserializer); } unserializer = createObjectUnserializer(type, names); unserializersCache[key] = unserializer; } finally { #if (dotNET35 || dotNET4) unserializersCacheLock.ExitWriteLock(); #else unserializersCacheLock.ReleaseWriterLock(); #endif } return(unserializer); }
public static object Unserialize(Stream stream, HproseMode mode, Type type) { HproseReader reader = new HproseReader(stream, mode); return(reader.Unserialize(type)); }
public static T Unserialize <T>(Stream stream, HproseMode mode) { HproseReader reader = new HproseReader(stream, mode); return(reader.Unserialize <T>()); }
public HproseTcpClient(string uri, HproseMode mode) : base(uri, mode) { InitHproseTcpClient(); }
protected HproseClient() { mode = HproseMode.FieldMode; filter = null; }
public HproseUnityHttpClient(string uri, HproseMode mode) : base(uri, mode) { mb = new MonoBehaviour(); }
public HproseTcpClient(HproseMode mode) : base(mode) { InitHproseTcpClient(); }
public HproseUnityHttpClient(string uri, HproseMode mode) : base(uri, mode) { mb = new MonoBehaviour(); }
public static void Serialize(object obj, Stream stream, HproseMode mode) { HproseWriter writer = new HproseWriter(stream, mode); writer.Serialize(obj); }
protected HproseClient(HproseMode mode) : this(null, mode) { }
protected HproseClient(HproseMode mode) : this(null, mode) { }
protected HproseClient(string uri, HproseMode mode) { if (uri != null) { UseService(uri); } this.mode = mode; }
protected HproseClient(string uri, HproseMode mode) { UseService(uri); this.mode = mode; }
protected HproseClient(HproseMode mode) { this.mode = mode; }
protected HproseClient(string uri) { UseService(uri); mode = HproseMode.FieldMode; }
protected HproseClient() { mode = HproseMode.FieldMode; filter = null; }
public HproseHttpClient(string uri, HproseMode mode) : base(uri, mode) { }
public HproseHttpClient(HproseMode mode) : base(mode) { }
protected HproseClient(string uri) { UseService(uri); mode = HproseMode.FieldMode; }
public CacheKey(HproseMode mode, Type type, string[] names) { this.mode = mode; this.type = type; this.names = names; }
protected HproseClient(HproseMode mode) { this.mode = mode; }
public HproseUnityHttpClient(HproseMode mode) : base(mode) { mb = new MonoBehaviour(); }
protected HproseClient(string uri, HproseMode mode) { UseService(uri); this.mode = mode; }
public HproseUnityHttpClient(HproseMode mode) : base(mode) { mb = new MonoBehaviour(); }
protected HproseClient() { mode = HproseMode.FieldMode; }