public static TEnum Parse <TEnum>( this EnumBinaryTranslation <TEnum, MutagenFrame, MutagenWriter> transl, MutagenFrame reader) where TEnum : struct, Enum, IConvertible { return(transl.Parse(reader, checked ((int)reader.Remaining))); }
public static void Write <TEnum>( this EnumBinaryTranslation <TEnum, MutagenFrame, MutagenWriter> transl, MutagenWriter writer, TEnum item, RecordType header, long length) where TEnum : struct, Enum, IConvertible { try { using (HeaderExport.Header(writer, header, ObjectType.Subrecord)) { transl.WriteValue(writer, item, length); } } catch (Exception ex) { throw SubrecordException.Factory(ex, header); } }