private void BuildField(RuntimicSystemModel semanticModel, BoundTypeDefinitionWithFields_I typeWithFields, FieldInfo fieldInfo) { var convertedField = new BoundField() { FieldType = null, UnderlyingField = fieldInfo, Name = fieldInfo.Name, }; typeWithFields.Fields.ByName.Add(convertedField.Name, convertedField); }
public void BuildField(RuntimicSystemModel semanticModel, BoundTypeDefinitionWithFields_I typeWithFields, FieldDefinition field, FieldInfo fieldInfo) { var fieldType = field.FieldType; // DotNet type is the elmeent type, not the elmenet type + modifier. if (field.FieldType.IsRequiredModifier) { RequiredModifierType modifierType = (RequiredModifierType)field.FieldType; fieldType = modifierType.ElementType; } Execution.Types.Ensuring.EnsureToType(semanticModel, fieldType, fieldInfo.FieldType, out BoundTypeDefinitionMask_I semanticFieldType); var convertedField = new BoundField() { FieldType = semanticFieldType, FieldDefinition = field, UnderlyingField = fieldInfo, Name = field.Name, }; typeWithFields.Fields.ByName.Add(convertedField.Name, convertedField); }