public override bool Connect(IDomain domain, IArea rootArea, IArea currentArea, IObject currentObject) { IResource Resource = TextResource; IObject Object = TextObject; IObjectProperty ObjectProperty = TextObjectProperty; IDeclarationSource ObjectPropertyKey = TextKey; bool IsConnected = TextProperty.ConnectToResourceOrObject(domain, currentArea, currentObject, ref Resource, ref Object, ref ObjectProperty, ref ObjectPropertyKey); if (!(ObjectProperty is IObjectPropertyInteger) && !(ObjectProperty is IObjectPropertyString) && !(ObjectProperty is IObjectPropertyReadonlyString) && !(ObjectProperty is IObjectPropertyEnum) && !(ObjectProperty is IObjectPropertyStringDictionary)) { throw new ParsingException(133, Source.Source, $"Invalid type for property '{Source.Name}'."); } TextResource = Resource; TextObject = Object; TextObjectProperty = ObjectProperty; TextKey = ObjectPropertyKey; TextObjectProperty?.SetIsRead(); return(IsConnected); }
public override bool Connect(IDomain domain, IArea rootArea, IArea currentArea, IObject currentObject) { IObject Object = TextObject; IObjectPropertyString ObjectProperty = TextObjectProperty; bool IsConnected = TextProperty.ConnectToObjectString(domain, currentArea, currentObject, ref Object, ref ObjectProperty); TextObject = Object; TextObjectProperty = ObjectProperty; TextObjectProperty?.SetIsReadWrite(); return(IsConnected); }