/// <summary> /// This method deserializes all properties that are serialized as XML attributes. /// </summary> /// <remarks> /// Because this method only handles properties serialized as XML attributes, the passed-in reader shouldn't be moved inside this method. /// The caller will guarantee that the reader is positioned on the open XML tag of the current element being deserialized. /// </remarks> /// <param name="serializationContext">Serialization context.</param> /// <param name="element">In-memory LinkShape instance that will get the deserialized data.</param> /// <param name="reader">XmlReader to read serialized data from.</param> protected override void ReadPropertiesFromAttributes(SerializationContext serializationContext, ModelElement element, System.Xml.XmlReader reader) { LinkShape instanceOfLinkShape = element as LinkShape; global::System.Diagnostics.Debug.Assert(instanceOfLinkShape != null, "Expecting an instance of LinkShape"); // DummyProperty if (!serializationContext.Result.Failed) { string attribDummyProperty = DiagramsDSLSerializationHelper.Instance.ReadAttribute(serializationContext, element, reader, "dummyProperty"); if (attribDummyProperty != null) { global::System.String valueOfDummyProperty; if (SerializationUtilities.TryGetValue <global::System.String>(serializationContext, attribDummyProperty, out valueOfDummyProperty)) { instanceOfLinkShape.DummyProperty = valueOfDummyProperty; } else { // Invalid property value, ignored. TestDslDefinitionSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "dummyProperty", typeof(global::System.String), attribDummyProperty); } } } // RoutingMode if (!serializationContext.Result.Failed) { string attribRoutingMode = DiagramsDSLSerializationHelper.Instance.ReadAttribute(serializationContext, element, reader, "routingMode"); if (attribRoutingMode != null) { RoutingMode valueOfRoutingMode; if (SerializationUtilities.TryGetValue <RoutingMode>(serializationContext, attribRoutingMode, out valueOfRoutingMode)) { instanceOfLinkShape.RoutingMode = valueOfRoutingMode; } else { // Invalid property value, ignored. TestDslDefinitionSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "routingMode", typeof(RoutingMode), attribRoutingMode); } } } //base.ReadPropertiesFromAttributes(serializationContext, element, reader); }