src/Misc/EFTools/EntityDesignEntityDesigner/GeneratedCode/SerializationHelper.cs
/// <summary>
/// Read an element from the root of XML.
/// </summary>
/// <param name="serializationContext">Serialization context.</param>
/// <param name="rootElement">In-memory element instance that will get the deserialized data.</param>
/// <param name="reader">XmlReader to read serialized data from.</param>
/// <param name="schemaResolver">An ISchemaResolver that allows the serializer to do schema validation on the root element (and everything inside it).</param>
Read an element from the root of XML.
Read an element from the root of XML .
protected virtual void ReadRootElement(DslModeling::SerializationContext serializationContext, DslModeling::ModelElement rootElement, global::System.Xml.XmlReader reader, DslModeling::ISchemaResolver schemaResolver)
		{
			#region Check Parameters
			global::System.Diagnostics.Debug.Assert(serializationContext != null);
			if (serializationContext == null)
				throw new global::System.ArgumentNullException("serializationContext");
			global::System.Diagnostics.Debug.Assert(rootElement != null);
			if (rootElement == null)
				throw new global::System.ArgumentNullException("rootElement");
			global::System.Diagnostics.Debug.Assert(reader != null);
			if (reader == null)
				throw new global::System.ArgumentNullException("reader");
			#endregion
			DslModeling::DomainXmlSerializerDirectory directory = this.GetDirectory(rootElement.Store);
			DslModeling::DomainClassXmlSerializer rootSerializer = directory.GetSerializer(rootElement.GetDomainClass().Id);
			global::System.Diagnostics.Debug.Assert(rootSerializer != null, "Cannot find serializer for " + rootElement.GetDomainClass().Name + "!");
			this.CheckVersion(serializationContext, reader);
			if (!serializationContext.Result.Failed)
			{	
				using (reader = TryCreateValidatingReader(schemaResolver, reader, serializationContext))
				{
					rootSerializer.Read(serializationContext, rootElement, reader);
				}
			}
		}
protected virtual void ReadRootElement ( DslModeling :: SerializationContext serializationContext , DslModeling :: ModelElement rootElement , global :: System . Xml . XmlReader reader , DslModeling :: ISchemaResolver schemaResolver ) { region  Check Parameters global :: System . Diagnostics . Debug . Assert ( serializationContext != null ) ; if ( serializationContext == null ) throw new global :: System . ArgumentNullException ( " " ) ; global :: System . Diagnostics . Debug . Assert ( rootElement != null ) ; if ( rootElement == null ) throw new global :: System . ArgumentNullException ( " " ) ; global :: System . Diagnostics . Debug . Assert ( reader != null ) ; if ( reader == null ) throw new global :: System . ArgumentNullException ( " " ) ; endregion DslModeling :: DomainXmlSerializerDirectory directory = this . GetDirectory ( rootElement . Store ) ; DslModeling :: DomainClassXmlSerializer rootSerializer = directory . GetSerializer ( rootElement . GetDomainClass ( ) . Id ) ; global :: System . Diagnostics . Debug . Assert ( rootSerializer != null , " " + rootElement . GetDomainClass ( ) . Name + " " ) ; this . CheckVersion ( serializationContext , reader ) ; if ( ! serializationContext . Result . Failed ) { using ( reader = TryCreateValidatingReader ( schemaResolver , reader , serializationContext ) ) { rootSerializer . Read ( serializationContext , rootElement , reader ) ; } } }
Read an element from the root of XML.
Read an element from the root of XML .
// Version check. // Use a validating reader if possible
serializationContext
DslModeling::SerializationContext
None
rootElement
DslModeling::ModelElement
In-memory element instance that will get the deserialized data.
In - memory element instance that will get the deserialized data .
reader
global::System.Xml.XmlReader
XmlReader to read serialized data from.
XmlReader to read serialized data from .
schemaResolver
DslModeling::ISchemaResolver
An ISchemaResolver that allows the serializer to do schema validation on the root element (and everything inside it).
An ISchemaResolver that allows the serializer to do schema validation on the root element ( and everything inside it ) .