public GeneratorObjectPropertyInteger(IObjectPropertyInteger property, IGeneratorObject obj) : base(property, obj) { if (property == ObjectPropertyInteger.NavigationIndexProperty) { GeneratorObjectPropertyMap.Add(property, this); } }
public bool ConnectToObjectInteger(IDomain domain, IArea currentArea, IObject currentObject, ref IObject obj, ref IObjectPropertyInteger objectProperty) { bool IsConnected = false; if ((ObjectSource != null || ObjectPropertySource != null) && (obj == null || objectProperty == null)) { ConnectToObject(domain, currentArea, ObjectSource, ObjectPropertySource, ObjectPropertyKey, ref obj); foreach (IObjectProperty Property in obj.Properties) { if (Property.NameSource.Name == ObjectPropertySource.Name) { if (Property is IObjectPropertyInteger AsObjectPropertyInteger) { objectProperty = AsObjectPropertyInteger; break; } else { throw new ParsingException(146, ObjectPropertySource.Source, $"'{obj.Name}.{ObjectPropertySource.Name}' must be an integer property."); } } } if (objectProperty == null) { throw new ParsingException(141, ObjectPropertySource.Source, $"Unknown property '{ObjectPropertySource.Name}' in object '{obj.Name}'."); } IsConnected = true; } return(IsConnected); }