private PropInfoEX HydrateAsMethodPair(HuskReader reader) { MethodInfoEX set_method = MethodInfoEXHusker.INSTANCE.Hydrate(reader); MethodInfoEX get_method = MethodInfoEXHusker.INSTANCE.Hydrate(reader); return(new PropInfoEX_MethodPair(set_method, get_method)); }
public override Module Hydrate(HuskReader reader) { string module_name = reader.ReadString(); if (module_name != "") { return(reader.ReadRecurrant(AssemblyHusker.INSTANCE).GetModule(module_name)); } return(null); }
public override Assembly Hydrate(HuskReader reader) { string full_name = reader.ReadString(); if (full_name != "") { return(Assembly.Load(full_name)); } return(null); }
public override FieldInfoEX Hydrate(HuskReader reader) { int metadata_token = reader.ReadInt(); if (metadata_token != 0) { return(reader.ReadRecurrant(TypeHusker.INSTANCE).ResolveField(metadata_token)); } return(null); }
public override PropInfoEX Hydrate(HuskReader reader) { byte type_token = reader.ReadByte(); switch (type_token) { case 1: return(HydrateAsField(reader)); case 2: return(HydrateAsMethodPair(reader)); } return(null); }
private AttemptResult Read(string filename, out T data) { return(STREAM_SYSTEM.AttemptRead(filename, delegate(Stream stream, out T inner_data) { HuskReader reader = new HuskReader(stream); if (reader.VerifyVersionHeader()) { inner_data = husker.Hydrate(reader); return true; } inner_data = default(T); return false; }, out data, 0)); }
public override Type Hydrate(HuskReader reader) { int metadata_token = reader.ReadInt(); if (metadata_token != 0) { Type type = reader.ReadRecurrant(ModuleHusker.INSTANCE).ResolveType(metadata_token); if (type.IsGenericClass()) { if (reader.ReadBoolBranch()) { return(type.MakeGenericType(TypeListHusker.INSTANCE.Hydrate(reader).ToArray())); } } return(type); } return(null); }
public override MethodInfoEX Hydrate(HuskReader reader) { int metadata_token = reader.ReadInt(); if (metadata_token != 0) { MethodInfoEX method = reader.ReadRecurrant(TypeHusker.INSTANCE).ResolveMethod(metadata_token); if (method.IsGenericMethod()) { if (reader.ReadBoolBranch()) { return(method.MakeGenericMethod(TypeListHusker.INSTANCE.Hydrate(reader).ToArray()) .GetMethodInfoEX()); } } return(method); } return(null); }
private PropInfoEX HydrateAsField(HuskReader reader) { FieldInfoEX field = FieldInfoEXHusker.INSTANCE.Hydrate(reader); return(new PropInfoEX_Field(field)); }
static public bool VerifyVersionHeader(this HuskReader item) { return(item.VerifyHeader(VersionInfo.GetId().GetBytes())); }