src/Misc/EFTools/EntityDesignEntityDesigner/GeneratedCode/Serializer.cs
/// <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 EntityTypeShape instance that will get the deserialized data.</param>
/// <param name="reader">XmlReader to read serialized data from.</param>
This method deserializes all properties that are serialized as XML attributes.
This method deserializes all properties that are serialized as XML attributes .
protected override void ReadPropertiesFromAttributes(DslModeling::SerializationContext serializationContext, DslModeling::ModelElement element, global::System.Xml.XmlReader reader)
		{
			base.ReadPropertiesFromAttributes(serializationContext, element, reader);
			global::Microsoft.Data.Entity.Design.EntityDesigner.View.EntityTypeShape instanceOfEntityTypeShape = element as global::Microsoft.Data.Entity.Design.EntityDesigner.View.EntityTypeShape;
			global::System.Diagnostics.Debug.Assert(instanceOfEntityTypeShape != null, "Expecting an instance of EntityTypeShape");
			if (!serializationContext.Result.Failed)
			{
				string attribFillColor = MicrosoftDataEntityDesignSerializationHelper.Instance.ReadAttribute(serializationContext, element, reader, "fillColor");
				if (attribFillColor != null)
				{
					global::System.Drawing.Color valueOfFillColor;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.Drawing.Color>(serializationContext, attribFillColor, out valueOfFillColor))
					{
						instanceOfEntityTypeShape.FillColor = valueOfFillColor;
					}
					else
					{	
						MicrosoftDataEntityDesignSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "fillColor", typeof(global::System.Drawing.Color), attribFillColor);
					}
				}
			}
		}
protected override void ReadPropertiesFromAttributes ( DslModeling :: SerializationContext serializationContext , DslModeling :: ModelElement element , global :: System . Xml . XmlReader reader ) { base . ReadPropertiesFromAttributes ( serializationContext , element , reader ) ; global :: Microsoft . Data . Entity . Design . EntityDesigner . View . EntityTypeShape instanceOfEntityTypeShape = element as global :: Microsoft . Data . Entity . Design . EntityDesigner . View . EntityTypeShape ; global :: System . Diagnostics . Debug . Assert ( instanceOfEntityTypeShape != null , " " ) ; if ( ! serializationContext . Result . Failed ) { string attribFillColor = MicrosoftDataEntityDesignSerializationHelper . Instance . ReadAttribute ( serializationContext , element , reader , " " ) ; if ( attribFillColor != null ) { global :: System . Drawing . Color valueOfFillColor ; if ( DslModeling :: SerializationUtilities . TryGetValue < global :: System . Drawing . Color > ( serializationContext , attribFillColor , out valueOfFillColor ) ) { instanceOfEntityTypeShape . FillColor = valueOfFillColor ; } else { MicrosoftDataEntityDesignSerializationBehaviorSerializationMessages . IgnoredPropertyValue ( serializationContext , reader , " " , typeof ( global :: System . Drawing . Color ) , attribFillColor ) ; } } } }
This method deserializes all properties that are serialized as XML attributes.
This method deserializes all properties that are serialized as XML attributes .
// Always call the base class so any extensions are deserialized // FillColor // Invalid property value, ignored.
serializationContext
DslModeling::SerializationContext
None
element
DslModeling::ModelElement
In-memory EntityTypeShape instance that will get the deserialized data.
In - memory EntityTypeShape instance that will get the deserialized data .
reader
global::System.Xml.XmlReader
XmlReader to read serialized data from.
XmlReader to read serialized data from .
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.
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 .