public static Func <string, object> GetConverter(this VeinField field) { try { return(GetConverter(field.FieldType.TypeCode)); } catch (NotSupportedException) { throw new ConvertNotSupportedException(field); } }
public static void DecodeField(BinaryReader binary, VeinClass @class, ModuleReader module) { foreach (var _ in..binary.ReadInt32()) { var name = FieldName.Resolve(binary.ReadInt32(), module); var type_name = binary.ReadTypeName(module); var type = module.FindType(type_name, true, false); var flags = (FieldFlags)binary.ReadInt16(); var method = new VeinField(@class, name, flags, type); @class.Fields.Add(method); } }
public ConvertNotSupportedException(VeinField field) : base($"Cannot get converted, '{field.FullName}' with '{field.FieldType.FullName.NameWithNS}' type is not supported.") { }
public MaybeMismatchTypeException(VeinField field, ValueWasIncorrectException exp) : base($"field: '{field.FullName}'", exp) { }