public ContentId Deserialize(Omnix.Serialization.RocketPack.RocketPackReader r, int rank) { if (rank > 256) { throw new System.FormatException(); } // Read property count uint propertyCount = r.GetUInt32(); ContentType p_type = (ContentType)0; string p_path = string.Empty; for (; propertyCount > 0; propertyCount--) { uint id = r.GetUInt32(); switch (id) { case 0: // Type { p_type = (ContentType)r.GetUInt64(); break; } case 1: // Path { p_path = r.GetString(1024); break; } } } return(new ContentId(p_type, p_path)); }
public OmniAddress Deserialize(Omnix.Serialization.RocketPack.RocketPackReader r, int rank) { if (rank > 256) { throw new System.FormatException(); } // Read property count uint propertyCount = r.GetUInt32(); string p_value = string.Empty; for (; propertyCount > 0; propertyCount--) { uint id = r.GetUInt32(); switch (id) { case 0: // Value { p_value = r.GetString(8192); break; } } } return(new OmniAddress(p_value)); }
public LxnaOptions Deserialize(Omnix.Serialization.RocketPack.RocketPackReader r, int rank) { if (rank > 256) { throw new System.FormatException(); } // Read property count uint propertyCount = r.GetUInt32(); string p_configDirectoryPath = string.Empty; for (; propertyCount > 0; propertyCount--) { uint id = r.GetUInt32(); switch (id) { case 0: // ConfigDirectoryPath { p_configDirectoryPath = r.GetString(1024); break; } } } return(new LxnaOptions(p_configDirectoryPath)); }
public OmniSignature Deserialize(Omnix.Serialization.RocketPack.RocketPackReader r, int rank) { if (rank > 256) { throw new System.FormatException(); } // Read property count uint propertyCount = r.GetUInt32(); string p_name = string.Empty; OmniHash p_hash = OmniHash.Empty; for (; propertyCount > 0; propertyCount--) { uint id = r.GetUInt32(); switch (id) { case 0: // Name { p_name = r.GetString(32); break; } case 1: // Hash { p_hash = OmniHash.Formatter.Deserialize(r, rank + 1); break; } } } return(new OmniSignature(p_name, p_hash)); }
public OmniRpcErrorMessage Deserialize(Omnix.Serialization.RocketPack.RocketPackReader r, int rank) { if (rank > 256) { throw new System.FormatException(); } // Read property count uint propertyCount = r.GetUInt32(); string p_type = string.Empty; string p_message = string.Empty; string p_stackTrace = string.Empty; for (; propertyCount > 0; propertyCount--) { uint id = r.GetUInt32(); switch (id) { case 0: // Type { p_type = r.GetString(8192); break; } case 1: // Message { p_message = r.GetString(8192); break; } case 2: // StackTrace { p_stackTrace = r.GetString(8192); break; } } } return(new OmniRpcErrorMessage(p_type, p_message, p_stackTrace)); }
public OmniDigitalSignature Deserialize(Omnix.Serialization.RocketPack.RocketPackReader r, int rank) { if (rank > 256) { throw new System.FormatException(); } // Read property count uint propertyCount = r.GetUInt32(); string p_name = string.Empty; OmniDigitalSignatureAlgorithmType p_algorithmType = (OmniDigitalSignatureAlgorithmType)0; System.ReadOnlyMemory <byte> p_publicKey = System.ReadOnlyMemory <byte> .Empty; System.ReadOnlyMemory <byte> p_privateKey = System.ReadOnlyMemory <byte> .Empty; for (; propertyCount > 0; propertyCount--) { uint id = r.GetUInt32(); switch (id) { case 0: // Name { p_name = r.GetString(32); break; } case 1: // AlgorithmType { p_algorithmType = (OmniDigitalSignatureAlgorithmType)r.GetUInt64(); break; } case 2: // PublicKey { p_publicKey = r.GetMemory(8192); break; } case 3: // PrivateKey { p_privateKey = r.GetMemory(8192); break; } } } return(new OmniDigitalSignature(p_name, p_algorithmType, p_publicKey, p_privateKey)); }
public FileId Deserialize(Omnix.Serialization.RocketPack.RocketPackReader r, int rank) { if (rank > 256) { throw new System.FormatException(); } // Read property count uint propertyCount = r.GetUInt32(); string p_path = string.Empty; ulong p_length = 0; Omnix.Serialization.RocketPack.Timestamp p_lastWriteTime = Omnix.Serialization.RocketPack.Timestamp.Zero; for (; propertyCount > 0; propertyCount--) { uint id = r.GetUInt32(); switch (id) { case 0: // Path { p_path = r.GetString(1024); break; } case 1: // Length { p_length = r.GetUInt64(); break; } case 2: // LastWriteTime { p_lastWriteTime = r.GetTimestamp(); break; } } } return(new FileId(p_path, p_length, p_lastWriteTime)); }