private void ConnectItems(IDomain domain, IArea currentArea, IObject currentObject, ref bool IsConnected) { IResource Resource = ItemsResource; IObject Object = ItemsObject; IObjectPropertyStringList ObjectProperty = ItemsObjectProperty; IsConnected |= ItemsProperty.ConnectToStringList(domain, currentArea, currentObject, ref Resource, ref Object, ref ObjectProperty); ItemsResource = Resource; ItemsObject = Object; ItemsObjectProperty = ObjectProperty; ItemsObjectProperty?.SetIsRead(); }
public GeneratorObjectPropertyStringList(IObjectPropertyStringList property, IGeneratorObject obj) : base(property, obj) { }
public bool ConnectToObjectStringList(IDomain domain, IArea currentArea, IObject currentObject, ref IObject obj, ref IObjectPropertyStringList 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 IObjectPropertyStringList AsObjectPropertyStringList) { objectProperty = AsObjectPropertyStringList; break; } else { throw new ParsingException(145, ObjectPropertySource.Source, $"'{obj.Name}.{ObjectPropertySource.Name}' must be a string list property."); } } } if (objectProperty == null) { throw new ParsingException(141, ObjectPropertySource.Source, $"Unknown property '{ObjectPropertySource.Name}' in object '{obj.Name}'."); } IsConnected = true; } return(IsConnected); }