src/Misc/EFTools/EntityDesignEntityDesigner/GeneratedCode/Serializer.cs
/// <summary>
/// This method creates a correct instance of Property based on the tag currently pointed by the reader. If the reader
/// is positioned at a serialized Property, a new Property instance will be created in the given partition, otherwise 
/// null is returned.
/// </summary>
/// <remarks>
/// The caller will guarantee that the reader is positioned at open XML tag of the next element being read. This method should
/// not move the reader; the reader should remain at the same position when this method returns.
/// </remarks>
/// <param name="serializationContext">Serialization context.</param>
/// <param name="reader">XmlReader to read serialized data from.</param>
/// <param name="partition">Partition in which new elements should be created.</param>	
/// <returns>Created Property instance, or null if the reader is not pointing to a serialized Property instance.</returns>
This method creates a correct instance of Property based on the tag currently pointed by the reader. If the reader
is positioned at a serialized Property, a new Property instance will be created in the given partition, otherwise
null is returned.
This method creates a correct instance of Property based on the tag currently pointed by the reader . If the reader is positioned at a serialized Property a new Property instance will be created in the given partition otherwise null is returned .
public override DslModeling::ModelElement TryCreateInstance(DslModeling::SerializationContext serializationContext, global::System.Xml.XmlReader reader, DslModeling::Partition partition)
		{
			#region Check Parameters
			global::System.Diagnostics.Debug.Assert (serializationContext != null);
			if (serializationContext == null)
				throw new global::System.ArgumentNullException ("serializationContext");
			global::System.Diagnostics.Debug.Assert (reader != null);
			if (reader == null)
				throw new global::System.ArgumentNullException ("reader");
			global::System.Diagnostics.Debug.Assert (partition != null);
			if (partition == null)
				throw new global::System.ArgumentNullException ("partition");
			#endregion
			DslModeling::ModelElement result = null;
			if (!serializationContext.Result.Failed && !reader.EOF && reader.NodeType == global::System.Xml.XmlNodeType.Element)
			{
				string localName = reader.LocalName;
				if (this.derivedClasses == null)
					this.ConstructDerivedClassesLookupTable(serializationContext, partition.DomainDataDirectory);
				global::System.Diagnostics.Debug.Assert (this.derivedClasses != null);
				DslModeling::DomainClassInfo derivedClass = null;
				if (this.derivedClasses.TryGetValue (localName, out derivedClass) && derivedClass != null)
				{	
					PropertySerializer derivedSerializer = serializationContext.Directory.GetSerializer(derivedClass.Id) as PropertySerializer;
					global::System.Diagnostics.Debug.Assert(derivedSerializer != null, "Cannot find serializer for " + derivedClass.Name + "!");
					result = derivedSerializer.CreateInstance(serializationContext, reader, partition);
				}
			}
			return result;
		}
public override DslModeling :: ModelElement TryCreateInstance ( DslModeling :: SerializationContext serializationContext , global :: System . Xml . XmlReader reader , DslModeling :: Partition partition ) { region  Check Parameters global :: System . Diagnostics . Debug . Assert ( serializationContext != null ) ; if ( serializationContext == null ) throw new global :: System . ArgumentNullException ( " " ) ; global :: System . Diagnostics . Debug . Assert ( reader != null ) ; if ( reader == null ) throw new global :: System . ArgumentNullException ( " " ) ; global :: System . Diagnostics . Debug . Assert ( partition != null ) ; if ( partition == null ) throw new global :: System . ArgumentNullException ( " " ) ; endregion DslModeling :: ModelElement result = null ; if ( ! serializationContext . Result . Failed && ! reader . EOF && reader . NodeType == global :: System . Xml . XmlNodeType . Element ) { string localName = reader . LocalName ; if ( this . derivedClasses == null ) this . ConstructDerivedClassesLookupTable ( serializationContext , partition . DomainDataDirectory ) ; global :: System . Diagnostics . Debug . Assert ( this . derivedClasses != null ) ; DslModeling :: DomainClassInfo derivedClass = null ; if ( this . derivedClasses . TryGetValue ( localName , out derivedClass ) && derivedClass != null ) { PropertySerializer derivedSerializer = serializationContext . Directory . GetSerializer ( derivedClass . Id ) as PropertySerializer ; global :: System . Diagnostics . Debug . Assert ( derivedSerializer != null , " " + derivedClass . Name + " " ) ; result = derivedSerializer . CreateInstance ( serializationContext , reader , partition ) ; } } return result ; }
This method creates a correct instance of Property based on the tag currently pointed by the reader.
This method creates a correct instance of Property based on the tag currently pointed by the reader .
// Check for derived classes of "Property". // New derived class instance.
Created Property instance, or null if the reader is not pointing to a serialized Property instance.
Created Property instance or null if the reader is not pointing to a serialized Property instance .
serializationContext
DslModeling::SerializationContext
None
reader
global::System.Xml.XmlReader
XmlReader to read serialized data from.
XmlReader to read serialized data from .
partition
DslModeling::Partition
Partition in which new elements should be created.
Partition in which new elements should be created .
remarks
The caller will guarantee that the reader is positioned at open XML tag of the next element being read. This method should
not move the reader; the reader should remain at the same position when this method returns.
The caller will guarantee that the reader is positioned at open XML tag of the next element being read . This method should not move the reader ; the reader should remain at the same position when this method returns .