src/Misc/EFTools/EntityDesignEntityDesigner/GeneratedCode/Serializer.cs
/// <summary>
/// Write all properties that need to be serialized as XML attributes.
/// </summary>
/// <param name="serializationContext">Serialization context.</param>
/// <param name="element">Property instance to be serialized.</param>
/// <param name="writer">XmlWriter to write serialized data to.</param> 
Write all properties that need to be serialized as XML attributes.
Write all properties that need to be serialized as XML attributes .
protected override void WritePropertiesAsAttributes(DslModeling::SerializationContext serializationContext, DslModeling::ModelElement element, global::System.Xml.XmlWriter writer)
		{
			base.WritePropertiesAsAttributes(serializationContext, element, writer);
			global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.Property instanceOfProperty = element as global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.Property;
			global::System.Diagnostics.Debug.Assert(instanceOfProperty != null, "Expecting an instance of Property");
			if (!serializationContext.Result.Failed)
			{
				global::System.String propValue = instanceOfProperty.Type;
				if (!serializationContext.Result.Failed)
				{
					if (propValue != null && (serializationContext.WriteOptionalPropertiesWithDefaultValue || string.CompareOrdinal(propValue, "String") != 0))
					{	
						MicrosoftDataEntityDesignSerializationHelper.Instance.WriteAttributeString(serializationContext, element, writer, "type", propValue);
					}
				}
			}
		}
protected override void WritePropertiesAsAttributes ( DslModeling :: SerializationContext serializationContext , DslModeling :: ModelElement element , global :: System . Xml . XmlWriter writer ) { base . WritePropertiesAsAttributes ( serializationContext , element , writer ) ; global :: Microsoft . Data . Entity . Design . EntityDesigner . ViewModel . Property instanceOfProperty = element as global :: Microsoft . Data . Entity . Design . EntityDesigner . ViewModel . Property ; global :: System . Diagnostics . Debug . Assert ( instanceOfProperty != null , " " ) ; if ( ! serializationContext . Result . Failed ) { global :: System . String propValue = instanceOfProperty . Type ; if ( ! serializationContext . Result . Failed ) { if ( propValue != null && ( serializationContext . WriteOptionalPropertiesWithDefaultValue || string . CompareOrdinal ( propValue , " " ) != 0 ) ) { MicrosoftDataEntityDesignSerializationHelper . Instance . WriteAttributeString ( serializationContext , element , writer , " " , propValue ) ; } } } }
Write all properties that need to be serialized as XML attributes.
Write all properties that need to be serialized as XML attributes .
// Always call the base class so any extensions are serialized // Type // No need to write the value out if it's the same as default value.
serializationContext
DslModeling::SerializationContext
None
element
DslModeling::ModelElement
Property instance to be serialized.
Property instance to be serialized .
writer
global::System.Xml.XmlWriter
XmlWriter to write serialized data to.
XmlWriter to write serialized data to .