private bool?CheckBlittable(Field field) { if (field.Map != null || field.List != null || field.Option != null) { blittableMap[field.Identifier] = false; return(false); } var innerSingularType = field.Singular.Type; if (innerSingularType.UserType != null) { if (!blittableMap.TryGetValue(CommonDetailsUtils.CreateIdentifier(innerSingularType.UserType.QualifiedName), out var isFieldBlittable)) { return(null); } blittableMap[field.Identifier] = isFieldBlittable; return(isFieldBlittable); } if (innerSingularType.Primitive != null && NonBlittableSchemaTypes.Contains(innerSingularType.Primitive)) { blittableMap[field.Identifier] = false; return(false); } // No need to check enums - they are always blittable. blittableMap[field.Identifier] = true; return(true); }
public void PopulateFields(DetailsStore store) { if (raw.Data != null) { FieldDetails = store.Types[CommonDetailsUtils.CreateIdentifier(raw.Data.QualifiedName)].FieldDetails; } else { FieldDetails = raw.Fields .Select(field => new UnityFieldDetails(field, store)) .ToList() .AsReadOnly(); } }