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">Association 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.Association instanceOfAssociation = element as global::Microsoft.Data.Entity.Design.EntityDesigner.ViewModel.Association;
			global::System.Diagnostics.Debug.Assert(instanceOfAssociation != null, "Expecting an instance of Association");
			if (!serializationContext.Result.Failed)
			{
				global::System.String propValue = instanceOfAssociation.Name;
				if (!serializationContext.Result.Failed)
				{
					if (!string.IsNullOrEmpty(propValue))
						MicrosoftDataEntityDesignSerializationHelper.Instance.WriteAttributeString(serializationContext, element, writer, "name", propValue);
				}
			}
			if (!serializationContext.Result.Failed)
			{
				global::System.String propValue = instanceOfAssociation.SourceMultiplicity;
				if (!serializationContext.Result.Failed)
				{
					if (!string.IsNullOrEmpty(propValue))
						MicrosoftDataEntityDesignSerializationHelper.Instance.WriteAttributeString(serializationContext, element, writer, "sourceMultiplicity", propValue);
				}
			}
			if (!serializationContext.Result.Failed)
			{
				global::System.String propValue = instanceOfAssociation.TargetMultiplicity;
				if (!serializationContext.Result.Failed)
				{
					if (!string.IsNullOrEmpty(propValue))
						MicrosoftDataEntityDesignSerializationHelper.Instance.WriteAttributeString(serializationContext, element, writer, "targetMultiplicity", 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 . Association instanceOfAssociation = element as global :: Microsoft . Data . Entity . Design . EntityDesigner . ViewModel . Association ; global :: System . Diagnostics . Debug . Assert ( instanceOfAssociation != null , " " ) ; if ( ! serializationContext . Result . Failed ) { global :: System . String propValue = instanceOfAssociation . Name ; if ( ! serializationContext . Result . Failed ) { if ( ! string . IsNullOrEmpty ( propValue ) ) MicrosoftDataEntityDesignSerializationHelper . Instance . WriteAttributeString ( serializationContext , element , writer , " " , propValue ) ; } } if ( ! serializationContext . Result . Failed ) { global :: System . String propValue = instanceOfAssociation . SourceMultiplicity ; if ( ! serializationContext . Result . Failed ) { if ( ! string . IsNullOrEmpty ( propValue ) ) MicrosoftDataEntityDesignSerializationHelper . Instance . WriteAttributeString ( serializationContext , element , writer , " " , propValue ) ; } } if ( ! serializationContext . Result . Failed ) { global :: System . String propValue = instanceOfAssociation . TargetMultiplicity ; if ( ! serializationContext . Result . Failed ) { if ( ! string . IsNullOrEmpty ( propValue ) ) 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 // Name // SourceMultiplicity // TargetMultiplicity
serializationContext
DslModeling::SerializationContext
None
element
DslModeling::ModelElement
Association instance to be serialized.
Association instance to be serialized .
writer
global::System.Xml.XmlWriter
XmlWriter to write serialized data to.
XmlWriter to write serialized data to .