/// <summary>
        /// This method creates an instance of AblaufbausteinShape based on the tag currently pointed by the reader. The reader is guaranteed (by the caller)
        /// to be pointed at a serialized instance of AblaufbausteinShape.
        /// </summary>
        /// <remarks>
        /// The caller will guarantee that the reader is positioned at open XML tag of the ModelRoot instance 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 AblaufbausteinShape instance should be created.</param>	
        /// <returns>Created AblaufbausteinShape instance.</returns>
        protected override ModelElement CreateInstance(SerializationContext serializationContext, global::System.Xml.XmlReader reader, Partition partition)
        {
            string idStr = reader.GetAttribute("Id");
            try
            {
                global::System.Guid id;
                if (string.IsNullOrEmpty(idStr))
                {	// Create a default Id.
                    id = global::System.Guid.NewGuid();
                    TestDslDefinitionSerializationBehaviorSerializationMessages.MissingId(serializationContext, reader, id);
                }
                else
                {
                    id = new global::System.Guid(idStr);
                }

                string elementIdStr = reader.GetAttribute("internalElementId");
                if (string.IsNullOrEmpty(elementIdStr))
                {
                    return null;
                }
                else
                {
                    global::System.Guid elementId = new global::System.Guid(elementIdStr);
                    ModelElement element = null;
                    if (elementId != System.Guid.Empty)
                        element = partition.ElementDirectory.FindElement(elementId);

                    if (element == null || !(element is IDomainModelOwnable))
                        return null;

                    return (element as IDomainModelOwnable).GetDomainModelServices().TopMostService.ShapeProvider.CreateShapeForElement(this.GetShapeClassId(), element,
                        new PropertyAssignment[]{ new PropertyAssignment(ElementFactory.IdPropertyAssignment, id)});
                }
            }
            catch (global::System.ArgumentNullException /* anEx */)
            {
                TestDslDefinitionSerializationBehaviorSerializationMessages.InvalidPropertyValue(serializationContext, reader, "Id", typeof(global::System.Guid), idStr);
            }
            catch (global::System.FormatException /* fEx */)
            {
                TestDslDefinitionSerializationBehaviorSerializationMessages.InvalidPropertyValue(serializationContext, reader, "Id", typeof(global::System.Guid), idStr);
            }
            catch (global::System.OverflowException /* ofEx */)
            {
                TestDslDefinitionSerializationBehaviorSerializationMessages.InvalidPropertyValue(serializationContext, reader, "Id", typeof(global::System.Guid), idStr);
            }
            return null;
        }		
		/// <summary>
		/// This method creates an instance of DesignerDiagram based on the tag currently pointed by the reader. The reader is guaranteed (by the caller)
		/// to be pointed at a serialized instance of DesignerDiagram.
		/// </summary>
		/// <remarks>
		/// The caller will guarantee that the reader is positioned at open XML tag of the ModelRoot instance 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 DesignerDiagram instance should be created.</param>	
		/// <returns>Created DesignerDiagram instance.</returns>
		protected override DslModeling::ModelElement CreateInstance(DslModeling::SerializationContext serializationContext, global::System.Xml.XmlReader reader, DslModeling::Partition partition)
		{
			string idStr = reader.GetAttribute ("Id");
			try
			{
				global::System.Guid id;
				if (string.IsNullOrEmpty(idStr))
				{	// Create a default Id.
					id = global::System.Guid.NewGuid();
					FamilyTreeDSLSerializationBehaviorSerializationMessages.MissingId(serializationContext, reader, id);
				}
				else
				{
					id = new global::System.Guid (idStr);
				}
				return new DesignerDiagram(partition, new DslModeling::PropertyAssignment(DslModeling::ElementFactory.IdPropertyAssignment, id));
			}
		catch (global::System.ArgumentNullException /* anEx */)
		{	
			FamilyTreeDSLSerializationBehaviorSerializationMessages.InvalidPropertyValue(serializationContext, reader, "Id", typeof(global::System.Guid), idStr);
		}
		catch (global::System.FormatException /* fEx */)
		{
			FamilyTreeDSLSerializationBehaviorSerializationMessages.InvalidPropertyValue(serializationContext, reader, "Id", typeof(global::System.Guid), idStr);
		}
		catch (global::System.OverflowException /* ofEx */)
		{
			FamilyTreeDSLSerializationBehaviorSerializationMessages.InvalidPropertyValue(serializationContext, reader, "Id", typeof(global::System.Guid), idStr);
		}
			return null;
		}		
		/// <summary>
		/// Attempts to return the encoding used by the reader.
		/// </summary>
		/// <remarks>
		/// The reader will be positioned at the start of the document when calling this method.
		/// </remarks>
		protected virtual bool TryGetEncoding(global::System.Xml.XmlReader reader, out global::System.Text.Encoding encoding)
		{
			global::System.Diagnostics.Debug.Assert(reader.NodeType == System.Xml.XmlNodeType.XmlDeclaration, "reader should be at the XmlDeclaration node when calling this method");
	
			encoding = null;
			// Attempt to read and parse the "encoding" attribute from the XML declaration node
			if (reader.NodeType == global::System.Xml.XmlNodeType.XmlDeclaration)
			{
				string encodingName = reader.GetAttribute("encoding");
				if (!string.IsNullOrWhiteSpace(encodingName))
				{
					encoding = global::System.Text.Encoding.GetEncoding(encodingName);
					return true;
				}
			}
			return false;
		}
Esempio n. 4
0
		protected override void ReadPropertiesFromAttributes(DslModeling::SerializationContext serializationContext, DslModeling::ModelElement element, global::System.Xml.XmlReader reader)
		{
			base.ReadPropertiesFromAttributes(serializationContext, element, reader);
	
			Operation instanceOfOperation = element as Operation;
			global::System.Diagnostics.Debug.Assert(instanceOfOperation != null, "Expecting an instance of Operation");
	
			// Signature
			if (!serializationContext.Result.Failed)
			{
				string attribSignature = reader.GetAttribute("signature");
				if (attribSignature != null)
				{
					global::System.String valueOfSignature;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribSignature), out valueOfSignature))
					{
						instanceOfOperation.Signature = valueOfSignature;
					}
					else
					{	// Invalid property value, ignored.
						LinqToRdfSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "signature", typeof(global::System.String), attribSignature);
					}
				}
			}
			// Concurrency
			if (!serializationContext.Result.Failed)
			{
				string attribConcurrency = reader.GetAttribute("concurrency");
				if (attribConcurrency != null)
				{
					OperationConcurrency valueOfConcurrency;
					if (DslModeling::SerializationUtilities.TryGetValue<OperationConcurrency>(DslModeling::SerializationUtilities.UnescapeXmlString(attribConcurrency), out valueOfConcurrency))
					{
						instanceOfOperation.Concurrency = valueOfConcurrency;
					}
					else
					{	// Invalid property value, ignored.
						LinqToRdfSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "concurrency", typeof(OperationConcurrency), attribConcurrency);
					}
				}
			}
			// Precondition
			if (!serializationContext.Result.Failed)
			{
				string attribPrecondition = reader.GetAttribute("precondition");
				if (attribPrecondition != null)
				{
					global::System.String valueOfPrecondition;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribPrecondition), out valueOfPrecondition))
					{
						instanceOfOperation.Precondition = valueOfPrecondition;
					}
					else
					{	// Invalid property value, ignored.
						LinqToRdfSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "precondition", typeof(global::System.String), attribPrecondition);
					}
				}
			}
			// Postcondition
			if (!serializationContext.Result.Failed)
			{
				string attribPostcondition = reader.GetAttribute("postcondition");
				if (attribPostcondition != null)
				{
					global::System.String valueOfPostcondition;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribPostcondition), out valueOfPostcondition))
					{
						instanceOfOperation.Postcondition = valueOfPostcondition;
					}
					else
					{	// Invalid property value, ignored.
						LinqToRdfSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "postcondition", typeof(global::System.String), attribPostcondition);
					}
				}
			}
		}
Esempio n. 5
0
		protected override void ReadPropertiesFromAttributes(DslModeling::SerializationContext serializationContext, DslModeling::ModelElement element, global::System.Xml.XmlReader reader)
		{
			base.ReadPropertiesFromAttributes(serializationContext, element, reader);
	
			ModelRoot instanceOfModelRoot = element as ModelRoot;
			global::System.Diagnostics.Debug.Assert(instanceOfModelRoot != null, "Expecting an instance of ModelRoot");
	
			// OntologyUri
			if (!serializationContext.Result.Failed)
			{
				string attribOntologyUri = reader.GetAttribute("ontologyUri");
				if (attribOntologyUri != null)
				{
					global::System.String valueOfOntologyUri;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribOntologyUri), out valueOfOntologyUri))
					{
						instanceOfModelRoot.OntologyUri = valueOfOntologyUri;
					}
					else
					{	// Invalid property value, ignored.
						LinqToRdfSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "ontologyUri", typeof(global::System.String), attribOntologyUri);
					}
				}
			}
		}
		/// <summary>
		/// Checks the version of the file being read.
		/// </summary>
		/// <param name="serializationContext">Serialization context.</param>
		/// <param name="reader">Reader for the file being read. The reader is positioned at the open tag of the root element being read.</param>
		protected virtual void CheckVersion(DslModeling::SerializationContext serializationContext, global::System.Xml.XmlReader reader)
		{
			#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");
			#endregion
	
			global::System.Version expectedVersion = new global::System.Version("1.0.0.0");
			string dslVersionStr = reader.GetAttribute("dslVersion");
			if (dslVersionStr != null)
			{
				try
				{
					global::System.Version actualVersion = new global::System.Version(dslVersionStr);
					if (actualVersion != expectedVersion)
					{
						HostDesignerSerializationBehaviorSerializationMessages.VersionMismatch(serializationContext, reader, expectedVersion, actualVersion);
					}
				}
				catch (global::System.ArgumentException)
				{
					HostDesignerSerializationBehaviorSerializationMessages.InvalidPropertyValue(serializationContext, reader, "dslVersion", typeof(global::System.Version), dslVersionStr);
				}
				catch (global::System.FormatException)
				{
					HostDesignerSerializationBehaviorSerializationMessages.InvalidPropertyValue(serializationContext, reader, "dslVersion", typeof(global::System.Version), dslVersionStr);
				}
				catch (global::System.OverflowException)
				{
					HostDesignerSerializationBehaviorSerializationMessages.InvalidPropertyValue(serializationContext, reader, "dslVersion", typeof(global::System.Version), dslVersionStr);
				}
			}
		}
Esempio n. 7
0
		protected virtual void ReadPropertiesFromAttributes(DslModeling::SerializationContext serializationContext, DslModeling::ModelElement element, global::System.Xml.XmlReader reader)
		{
			Model instanceOfModel = element as Model;
			global::System.Diagnostics.Debug.Assert(instanceOfModel != null, "Expecting an instance of Model");
	
			// UseNullables
			if (!serializationContext.Result.Failed)
			{
				string attribUseNullables = reader.GetAttribute("useNullables");
				if (attribUseNullables != null)
				{
					NullableUsage valueOfUseNullables;
					if (DslModeling::SerializationUtilities.TryGetValue<NullableUsage>(DslModeling::SerializationUtilities.UnescapeXmlString(attribUseNullables), out valueOfUseNullables))
					{
						instanceOfModel.UseNullables = valueOfUseNullables;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "useNullables", typeof(NullableUsage), attribUseNullables);
					}
				}
			}
			// CaseOfPrivateFields
			if (!serializationContext.Result.Failed)
			{
				string attribCaseOfPrivateFields = reader.GetAttribute("caseOfPrivateFields");
				if (attribCaseOfPrivateFields != null)
				{
					FieldCase valueOfCaseOfPrivateFields;
					if (DslModeling::SerializationUtilities.TryGetValue<FieldCase>(DslModeling::SerializationUtilities.UnescapeXmlString(attribCaseOfPrivateFields), out valueOfCaseOfPrivateFields))
					{
						instanceOfModel.CaseOfPrivateFields = valueOfCaseOfPrivateFields;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "caseOfPrivateFields", typeof(FieldCase), attribCaseOfPrivateFields);
					}
				}
			}
			// GenerateMonoRailProject
			if (!serializationContext.Result.Failed)
			{
				string attribGenerateMonoRailProject = reader.GetAttribute("generateMonoRailProject");
				if (attribGenerateMonoRailProject != null)
				{
					global::System.Boolean valueOfGenerateMonoRailProject;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.Boolean>(DslModeling::SerializationUtilities.UnescapeXmlString(attribGenerateMonoRailProject), out valueOfGenerateMonoRailProject))
					{
						instanceOfModel.GenerateMonoRailProject = valueOfGenerateMonoRailProject;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "generateMonoRailProject", typeof(global::System.Boolean), attribGenerateMonoRailProject);
					}
				}
			}
			// MonoRailProjectName
			if (!serializationContext.Result.Failed)
			{
				string attribMonoRailProjectName = reader.GetAttribute("monoRailProjectName");
				if (attribMonoRailProjectName != null)
				{
					global::System.String valueOfMonoRailProjectName;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribMonoRailProjectName), out valueOfMonoRailProjectName))
					{
						instanceOfModel.MonoRailProjectName = valueOfMonoRailProjectName;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "monoRailProjectName", typeof(global::System.String), attribMonoRailProjectName);
					}
				}
			}
			// MonoRailProjectPath
			if (!serializationContext.Result.Failed)
			{
				string attribMonoRailProjectPath = reader.GetAttribute("monoRailProjectPath");
				if (attribMonoRailProjectPath != null)
				{
					global::System.String valueOfMonoRailProjectPath;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribMonoRailProjectPath), out valueOfMonoRailProjectPath))
					{
						instanceOfModel.MonoRailProjectPath = valueOfMonoRailProjectPath;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "monoRailProjectPath", typeof(global::System.String), attribMonoRailProjectPath);
					}
				}
			}
			// MonoRailDefaultLayout
			if (!serializationContext.Result.Failed)
			{
				string attribMonoRailDefaultLayout = reader.GetAttribute("monoRailDefaultLayout");
				if (attribMonoRailDefaultLayout != null)
				{
					global::System.String valueOfMonoRailDefaultLayout;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribMonoRailDefaultLayout), out valueOfMonoRailDefaultLayout))
					{
						instanceOfModel.MonoRailDefaultLayout = valueOfMonoRailDefaultLayout;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "monoRailDefaultLayout", typeof(global::System.String), attribMonoRailDefaultLayout);
					}
				}
			}
			// MonoRailDefaultRescue
			if (!serializationContext.Result.Failed)
			{
				string attribMonoRailDefaultRescue = reader.GetAttribute("monoRailDefaultRescue");
				if (attribMonoRailDefaultRescue != null)
				{
					global::System.String valueOfMonoRailDefaultRescue;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribMonoRailDefaultRescue), out valueOfMonoRailDefaultRescue))
					{
						instanceOfModel.MonoRailDefaultRescue = valueOfMonoRailDefaultRescue;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "monoRailDefaultRescue", typeof(global::System.String), attribMonoRailDefaultRescue);
					}
				}
			}
			// MonoRailViewFileExtension
			if (!serializationContext.Result.Failed)
			{
				string attribMonoRailViewFileExtension = reader.GetAttribute("monoRailViewFileExtension");
				if (attribMonoRailViewFileExtension != null)
				{
					global::System.String valueOfMonoRailViewFileExtension;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribMonoRailViewFileExtension), out valueOfMonoRailViewFileExtension))
					{
						instanceOfModel.MonoRailViewFileExtension = valueOfMonoRailViewFileExtension;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "monoRailViewFileExtension", typeof(global::System.String), attribMonoRailViewFileExtension);
					}
				}
			}
			// UseGenerics
			if (!serializationContext.Result.Failed)
			{
				string attribUseGenerics = reader.GetAttribute("useGenerics");
				if (attribUseGenerics != null)
				{
					global::System.Boolean valueOfUseGenerics;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.Boolean>(DslModeling::SerializationUtilities.UnescapeXmlString(attribUseGenerics), out valueOfUseGenerics))
					{
						instanceOfModel.UseGenerics = valueOfUseGenerics;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "useGenerics", typeof(global::System.Boolean), attribUseGenerics);
					}
				}
			}
			// UseBaseClass
			if (!serializationContext.Result.Failed)
			{
				string attribUseBaseClass = reader.GetAttribute("useBaseClass");
				if (attribUseBaseClass != null)
				{
					global::System.Boolean valueOfUseBaseClass;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.Boolean>(DslModeling::SerializationUtilities.UnescapeXmlString(attribUseBaseClass), out valueOfUseBaseClass))
					{
						instanceOfModel.UseBaseClass = valueOfUseBaseClass;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "useBaseClass", typeof(global::System.Boolean), attribUseBaseClass);
					}
				}
			}
			// BaseClassName
			if (!serializationContext.Result.Failed)
			{
				string attribBaseClassName = reader.GetAttribute("baseClassName");
				if (attribBaseClassName != null)
				{
					global::System.String valueOfBaseClassName;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribBaseClassName), out valueOfBaseClassName))
					{
						instanceOfModel.BaseClassName = valueOfBaseClassName;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "baseClassName", typeof(global::System.String), attribBaseClassName);
					}
				}
			}
			// GeneratesDoubleDerived
			if (!serializationContext.Result.Failed)
			{
				string attribGeneratesDoubleDerived = reader.GetAttribute("generatesDoubleDerived");
				if (attribGeneratesDoubleDerived != null)
				{
					global::System.Boolean valueOfGeneratesDoubleDerived;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.Boolean>(DslModeling::SerializationUtilities.UnescapeXmlString(attribGeneratesDoubleDerived), out valueOfGeneratesDoubleDerived))
					{
						instanceOfModel.GeneratesDoubleDerived = valueOfGeneratesDoubleDerived;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "generatesDoubleDerived", typeof(global::System.Boolean), attribGeneratesDoubleDerived);
					}
				}
			}
			// DoubleDerivedNameSuffix
			if (!serializationContext.Result.Failed)
			{
				string attribDoubleDerivedNameSuffix = reader.GetAttribute("doubleDerivedNameSuffix");
				if (attribDoubleDerivedNameSuffix != null)
				{
					global::System.String valueOfDoubleDerivedNameSuffix;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribDoubleDerivedNameSuffix), out valueOfDoubleDerivedNameSuffix))
					{
						instanceOfModel.DoubleDerivedNameSuffix = valueOfDoubleDerivedNameSuffix;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "doubleDerivedNameSuffix", typeof(global::System.String), attribDoubleDerivedNameSuffix);
					}
				}
			}
			// UseGeneratedCodeAttribute
			if (!serializationContext.Result.Failed)
			{
				string attribUseGeneratedCodeAttribute = reader.GetAttribute("useGeneratedCodeAttribute");
				if (attribUseGeneratedCodeAttribute != null)
				{
					global::System.Boolean valueOfUseGeneratedCodeAttribute;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.Boolean>(DslModeling::SerializationUtilities.UnescapeXmlString(attribUseGeneratedCodeAttribute), out valueOfUseGeneratedCodeAttribute))
					{
						instanceOfModel.UseGeneratedCodeAttribute = valueOfUseGeneratedCodeAttribute;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "useGeneratedCodeAttribute", typeof(global::System.Boolean), attribUseGeneratedCodeAttribute);
					}
				}
			}
			// Target
			if (!serializationContext.Result.Failed)
			{
				string attribTarget = reader.GetAttribute("target");
				if (attribTarget != null)
				{
					CodeGenerationTarget valueOfTarget;
					if (DslModeling::SerializationUtilities.TryGetValue<CodeGenerationTarget>(DslModeling::SerializationUtilities.UnescapeXmlString(attribTarget), out valueOfTarget))
					{
						instanceOfModel.Target = valueOfTarget;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "target", typeof(CodeGenerationTarget), attribTarget);
					}
				}
			}
			// AssemblyPath
			if (!serializationContext.Result.Failed)
			{
				string attribAssemblyPath = reader.GetAttribute("assemblyPath");
				if (attribAssemblyPath != null)
				{
					global::System.String valueOfAssemblyPath;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribAssemblyPath), out valueOfAssemblyPath))
					{
						instanceOfModel.AssemblyPath = valueOfAssemblyPath;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "assemblyPath", typeof(global::System.String), attribAssemblyPath);
					}
				}
			}
			// ActiveRecordAssemblyName
			if (!serializationContext.Result.Failed)
			{
				string attribActiveRecordAssemblyName = reader.GetAttribute("activeRecordAssemblyName");
				if (attribActiveRecordAssemblyName != null)
				{
					global::System.String valueOfActiveRecordAssemblyName;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribActiveRecordAssemblyName), out valueOfActiveRecordAssemblyName))
					{
						instanceOfModel.ActiveRecordAssemblyName = valueOfActiveRecordAssemblyName;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "activeRecordAssemblyName", typeof(global::System.String), attribActiveRecordAssemblyName);
					}
				}
			}
			// NHibernateAssemblyName
			if (!serializationContext.Result.Failed)
			{
				string attribNHibernateAssemblyName = reader.GetAttribute("nHibernateAssemblyName");
				if (attribNHibernateAssemblyName != null)
				{
					global::System.String valueOfNHibernateAssemblyName;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribNHibernateAssemblyName), out valueOfNHibernateAssemblyName))
					{
						instanceOfModel.NHibernateAssemblyName = valueOfNHibernateAssemblyName;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "nHibernateAssemblyName", typeof(global::System.String), attribNHibernateAssemblyName);
					}
				}
			}
			// RelateWithActiwFile
			if (!serializationContext.Result.Failed)
			{
				string attribRelateWithActiwFile = reader.GetAttribute("relateWithActiwFile");
				if (attribRelateWithActiwFile != null)
				{
					global::System.Boolean valueOfRelateWithActiwFile;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.Boolean>(DslModeling::SerializationUtilities.UnescapeXmlString(attribRelateWithActiwFile), out valueOfRelateWithActiwFile))
					{
						instanceOfModel.RelateWithActiwFile = valueOfRelateWithActiwFile;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "relateWithActiwFile", typeof(global::System.Boolean), attribRelateWithActiwFile);
					}
				}
			}
			// UseVirtualProperties
			if (!serializationContext.Result.Failed)
			{
				string attribUseVirtualProperties = reader.GetAttribute("useVirtualProperties");
				if (attribUseVirtualProperties != null)
				{
					global::System.Boolean valueOfUseVirtualProperties;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.Boolean>(DslModeling::SerializationUtilities.UnescapeXmlString(attribUseVirtualProperties), out valueOfUseVirtualProperties))
					{
						instanceOfModel.UseVirtualProperties = valueOfUseVirtualProperties;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "useVirtualProperties", typeof(global::System.Boolean), attribUseVirtualProperties);
					}
				}
			}
			// Namespace
			if (!serializationContext.Result.Failed)
			{
				string attribNamespace = reader.GetAttribute("namespace");
				if (attribNamespace != null)
				{
					global::System.String valueOfNamespace;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribNamespace), out valueOfNamespace))
					{
						instanceOfModel.Namespace = valueOfNamespace;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "namespace", typeof(global::System.String), attribNamespace);
					}
				}
			}
			// ImplementINotifyPropertyChanged
			if (!serializationContext.Result.Failed)
			{
				string attribImplementINotifyPropertyChanged = reader.GetAttribute("implementINotifyPropertyChanged");
				if (attribImplementINotifyPropertyChanged != null)
				{
					global::System.Boolean valueOfImplementINotifyPropertyChanged;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.Boolean>(DslModeling::SerializationUtilities.UnescapeXmlString(attribImplementINotifyPropertyChanged), out valueOfImplementINotifyPropertyChanged))
					{
						instanceOfModel.ImplementINotifyPropertyChanged = valueOfImplementINotifyPropertyChanged;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "implementINotifyPropertyChanged", typeof(global::System.Boolean), attribImplementINotifyPropertyChanged);
					}
				}
			}
			// GenerateMetaData
			if (!serializationContext.Result.Failed)
			{
				string attribGenerateMetaData = reader.GetAttribute("generateMetaData");
				if (attribGenerateMetaData != null)
				{
					MetaDataGeneration valueOfGenerateMetaData;
					if (DslModeling::SerializationUtilities.TryGetValue<MetaDataGeneration>(DslModeling::SerializationUtilities.UnescapeXmlString(attribGenerateMetaData), out valueOfGenerateMetaData))
					{
						instanceOfModel.GenerateMetaData = valueOfGenerateMetaData;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "generateMetaData", typeof(MetaDataGeneration), attribGenerateMetaData);
					}
				}
			}
			// UseNHQG
			if (!serializationContext.Result.Failed)
			{
				string attribUseNHQG = reader.GetAttribute("useNHQG");
				if (attribUseNHQG != null)
				{
					global::System.Boolean valueOfUseNHQG;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.Boolean>(DslModeling::SerializationUtilities.UnescapeXmlString(attribUseNHQG), out valueOfUseNHQG))
					{
						instanceOfModel.UseNHQG = valueOfUseNHQG;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "useNHQG", typeof(global::System.Boolean), attribUseNHQG);
					}
				}
			}
			// NHQGExecutable
			if (!serializationContext.Result.Failed)
			{
				string attribNHQGExecutable = reader.GetAttribute("nHQGExecutable");
				if (attribNHQGExecutable != null)
				{
					global::System.String valueOfNHQGExecutable;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribNHQGExecutable), out valueOfNHQGExecutable))
					{
						instanceOfModel.NHQGExecutable = valueOfNHQGExecutable;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "nHQGExecutable", typeof(global::System.String), attribNHQGExecutable);
					}
				}
			}
			// UseGenericRelations
			if (!serializationContext.Result.Failed)
			{
				string attribUseGenericRelations = reader.GetAttribute("useGenericRelations");
				if (attribUseGenericRelations != null)
				{
					global::System.Boolean valueOfUseGenericRelations;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.Boolean>(DslModeling::SerializationUtilities.UnescapeXmlString(attribUseGenericRelations), out valueOfUseGenericRelations))
					{
						instanceOfModel.UseGenericRelations = valueOfUseGenericRelations;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "useGenericRelations", typeof(global::System.Boolean), attribUseGenericRelations);
					}
				}
			}
			// PropertyNameFilterExpression
			if (!serializationContext.Result.Failed)
			{
				string attribPropertyNameFilterExpression = reader.GetAttribute("propertyNameFilterExpression");
				if (attribPropertyNameFilterExpression != null)
				{
					global::System.String valueOfPropertyNameFilterExpression;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribPropertyNameFilterExpression), out valueOfPropertyNameFilterExpression))
					{
						instanceOfModel.PropertyNameFilterExpression = valueOfPropertyNameFilterExpression;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "propertyNameFilterExpression", typeof(global::System.String), attribPropertyNameFilterExpression);
					}
				}
			}
			// InitializeIListFields
			if (!serializationContext.Result.Failed)
			{
				string attribInitializeIListFields = reader.GetAttribute("initializeIListFields");
				if (attribInitializeIListFields != null)
				{
					global::System.Boolean valueOfInitializeIListFields;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.Boolean>(DslModeling::SerializationUtilities.UnescapeXmlString(attribInitializeIListFields), out valueOfInitializeIListFields))
					{
						instanceOfModel.InitializeIListFields = valueOfInitializeIListFields;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "initializeIListFields", typeof(global::System.Boolean), attribInitializeIListFields);
					}
				}
			}
		}
Esempio n. 8
0
		protected override void ReadPropertiesFromAttributes(DslModeling::SerializationContext serializationContext, DslModeling::ModelElement element, global::System.Xml.XmlReader reader)
		{
			base.ReadPropertiesFromAttributes(serializationContext, element, reader);
	
			ModelProperty instanceOfModelProperty = element as ModelProperty;
			global::System.Diagnostics.Debug.Assert(instanceOfModelProperty != null, "Expecting an instance of ModelProperty");
	
			// Column
			if (!serializationContext.Result.Failed)
			{
				string attribColumn = reader.GetAttribute("column");
				if (attribColumn != null)
				{
					global::System.String valueOfColumn;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribColumn), out valueOfColumn))
					{
						instanceOfModelProperty.Column = valueOfColumn;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "column", typeof(global::System.String), attribColumn);
					}
				}
			}
			// ColumnType
			if (!serializationContext.Result.Failed)
			{
				string attribColumnType = reader.GetAttribute("columnType");
				if (attribColumnType != null)
				{
					NHibernateType valueOfColumnType;
					if (DslModeling::SerializationUtilities.TryGetValue<NHibernateType>(DslModeling::SerializationUtilities.UnescapeXmlString(attribColumnType), out valueOfColumnType))
					{
						instanceOfModelProperty.ColumnType = valueOfColumnType;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "columnType", typeof(NHibernateType), attribColumnType);
					}
				}
			}
			// CustomColumnType
			if (!serializationContext.Result.Failed)
			{
				string attribCustomColumnType = reader.GetAttribute("customColumnType");
				if (attribCustomColumnType != null)
				{
					global::System.String valueOfCustomColumnType;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribCustomColumnType), out valueOfCustomColumnType))
					{
						instanceOfModelProperty.CustomColumnType = valueOfCustomColumnType;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "customColumnType", typeof(global::System.String), attribCustomColumnType);
					}
				}
			}
			// CustomMemberType
			if (!serializationContext.Result.Failed)
			{
				string attribCustomMemberType = reader.GetAttribute("customMemberType");
				if (attribCustomMemberType != null)
				{
					global::System.String valueOfCustomMemberType;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribCustomMemberType), out valueOfCustomMemberType))
					{
						instanceOfModelProperty.CustomMemberType = valueOfCustomMemberType;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "customMemberType", typeof(global::System.String), attribCustomMemberType);
					}
				}
			}
			// Formula
			if (!serializationContext.Result.Failed)
			{
				string attribFormula = reader.GetAttribute("formula");
				if (attribFormula != null)
				{
					global::System.String valueOfFormula;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribFormula), out valueOfFormula))
					{
						instanceOfModelProperty.Formula = valueOfFormula;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "formula", typeof(global::System.String), attribFormula);
					}
				}
			}
			// Insert
			if (!serializationContext.Result.Failed)
			{
				string attribInsert = reader.GetAttribute("insert");
				if (attribInsert != null)
				{
					global::System.Boolean valueOfInsert;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.Boolean>(DslModeling::SerializationUtilities.UnescapeXmlString(attribInsert), out valueOfInsert))
					{
						instanceOfModelProperty.Insert = valueOfInsert;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "insert", typeof(global::System.Boolean), attribInsert);
					}
				}
			}
			// Length
			if (!serializationContext.Result.Failed)
			{
				string attribLength = reader.GetAttribute("length");
				if (attribLength != null)
				{
					global::System.Int32 valueOfLength;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.Int32>(DslModeling::SerializationUtilities.UnescapeXmlString(attribLength), out valueOfLength))
					{
						instanceOfModelProperty.Length = valueOfLength;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "length", typeof(global::System.Int32), attribLength);
					}
				}
			}
			// NotNull
			if (!serializationContext.Result.Failed)
			{
				string attribNotNull = reader.GetAttribute("notNull");
				if (attribNotNull != null)
				{
					global::System.Boolean valueOfNotNull;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.Boolean>(DslModeling::SerializationUtilities.UnescapeXmlString(attribNotNull), out valueOfNotNull))
					{
						instanceOfModelProperty.NotNull = valueOfNotNull;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "notNull", typeof(global::System.Boolean), attribNotNull);
					}
				}
			}
			// Unique
			if (!serializationContext.Result.Failed)
			{
				string attribUnique = reader.GetAttribute("unique");
				if (attribUnique != null)
				{
					global::System.Boolean valueOfUnique;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.Boolean>(DslModeling::SerializationUtilities.UnescapeXmlString(attribUnique), out valueOfUnique))
					{
						instanceOfModelProperty.Unique = valueOfUnique;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "unique", typeof(global::System.Boolean), attribUnique);
					}
				}
			}
			// UnsavedValue
			if (!serializationContext.Result.Failed)
			{
				string attribUnsavedValue = reader.GetAttribute("unsavedValue");
				if (attribUnsavedValue != null)
				{
					global::System.String valueOfUnsavedValue;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribUnsavedValue), out valueOfUnsavedValue))
					{
						instanceOfModelProperty.UnsavedValue = valueOfUnsavedValue;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "unsavedValue", typeof(global::System.String), attribUnsavedValue);
					}
				}
			}
			// Update
			if (!serializationContext.Result.Failed)
			{
				string attribUpdate = reader.GetAttribute("update");
				if (attribUpdate != null)
				{
					global::System.Boolean valueOfUpdate;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.Boolean>(DslModeling::SerializationUtilities.UnescapeXmlString(attribUpdate), out valueOfUpdate))
					{
						instanceOfModelProperty.Update = valueOfUpdate;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "update", typeof(global::System.Boolean), attribUpdate);
					}
				}
			}
			// Generator
			if (!serializationContext.Result.Failed)
			{
				string attribGenerator = reader.GetAttribute("generator");
				if (attribGenerator != null)
				{
					PrimaryKeyType valueOfGenerator;
					if (DslModeling::SerializationUtilities.TryGetValue<PrimaryKeyType>(DslModeling::SerializationUtilities.UnescapeXmlString(attribGenerator), out valueOfGenerator))
					{
						instanceOfModelProperty.Generator = valueOfGenerator;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "generator", typeof(PrimaryKeyType), attribGenerator);
					}
				}
			}
			// KeyType
			if (!serializationContext.Result.Failed)
			{
				string attribKeyType = reader.GetAttribute("keyType");
				if (attribKeyType != null)
				{
					KeyType valueOfKeyType;
					if (DslModeling::SerializationUtilities.TryGetValue<KeyType>(DslModeling::SerializationUtilities.UnescapeXmlString(attribKeyType), out valueOfKeyType))
					{
						instanceOfModelProperty.KeyType = valueOfKeyType;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "keyType", typeof(KeyType), attribKeyType);
					}
				}
			}
			// Params
			if (!serializationContext.Result.Failed)
			{
				string attribParams = reader.GetAttribute("params");
				if (attribParams != null)
				{
					global::System.String valueOfParams;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribParams), out valueOfParams))
					{
						instanceOfModelProperty.Params = valueOfParams;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "params", typeof(global::System.String), attribParams);
					}
				}
			}
			// SequenceName
			if (!serializationContext.Result.Failed)
			{
				string attribSequenceName = reader.GetAttribute("sequenceName");
				if (attribSequenceName != null)
				{
					global::System.String valueOfSequenceName;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribSequenceName), out valueOfSequenceName))
					{
						instanceOfModelProperty.SequenceName = valueOfSequenceName;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "sequenceName", typeof(global::System.String), attribSequenceName);
					}
				}
			}
			// Accessor
			if (!serializationContext.Result.Failed)
			{
				string attribAccessor = reader.GetAttribute("accessor");
				if (attribAccessor != null)
				{
					Accessor valueOfAccessor;
					if (DslModeling::SerializationUtilities.TryGetValue<Accessor>(DslModeling::SerializationUtilities.UnescapeXmlString(attribAccessor), out valueOfAccessor))
					{
						instanceOfModelProperty.Accessor = valueOfAccessor;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "accessor", typeof(Accessor), attribAccessor);
					}
				}
			}
			// CompositeKeyName
			if (!serializationContext.Result.Failed)
			{
				string attribCompositeKeyName = reader.GetAttribute("compositeKeyName");
				if (attribCompositeKeyName != null)
				{
					global::System.String valueOfCompositeKeyName;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribCompositeKeyName), out valueOfCompositeKeyName))
					{
						instanceOfModelProperty.CompositeKeyName = valueOfCompositeKeyName;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "compositeKeyName", typeof(global::System.String), attribCompositeKeyName);
					}
				}
			}
			// PropertyType
			if (!serializationContext.Result.Failed)
			{
				string attribPropertyType = reader.GetAttribute("propertyType");
				if (attribPropertyType != null)
				{
					PropertyType valueOfPropertyType;
					if (DslModeling::SerializationUtilities.TryGetValue<PropertyType>(DslModeling::SerializationUtilities.UnescapeXmlString(attribPropertyType), out valueOfPropertyType))
					{
						instanceOfModelProperty.PropertyType = valueOfPropertyType;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "propertyType", typeof(PropertyType), attribPropertyType);
					}
				}
			}
			// DebuggerDisplay
			if (!serializationContext.Result.Failed)
			{
				string attribDebuggerDisplay = reader.GetAttribute("debuggerDisplay");
				if (attribDebuggerDisplay != null)
				{
					global::System.Boolean valueOfDebuggerDisplay;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.Boolean>(DslModeling::SerializationUtilities.UnescapeXmlString(attribDebuggerDisplay), out valueOfDebuggerDisplay))
					{
						instanceOfModelProperty.DebuggerDisplay = valueOfDebuggerDisplay;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "debuggerDisplay", typeof(global::System.Boolean), attribDebuggerDisplay);
					}
				}
			}
			// Validator
			if (!serializationContext.Result.Failed)
			{
				string attribValidator = reader.GetAttribute("validator");
				if (attribValidator != null)
				{
					global::System.String valueOfValidator;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribValidator), out valueOfValidator))
					{
						instanceOfModelProperty.Validator = valueOfValidator;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "validator", typeof(global::System.String), attribValidator);
					}
				}
			}
			// UniqueKey
			if (!serializationContext.Result.Failed)
			{
				string attribUniqueKey = reader.GetAttribute("uniqueKey");
				if (attribUniqueKey != null)
				{
					global::System.String valueOfUniqueKey;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribUniqueKey), out valueOfUniqueKey))
					{
						instanceOfModelProperty.UniqueKey = valueOfUniqueKey;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "uniqueKey", typeof(global::System.String), attribUniqueKey);
					}
				}
			}
			// Index
			if (!serializationContext.Result.Failed)
			{
				string attribIndex = reader.GetAttribute("index");
				if (attribIndex != null)
				{
					global::System.String valueOfIndex;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribIndex), out valueOfIndex))
					{
						instanceOfModelProperty.Index = valueOfIndex;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "index", typeof(global::System.String), attribIndex);
					}
				}
			}
			// SqlType
			if (!serializationContext.Result.Failed)
			{
				string attribSqlType = reader.GetAttribute("sqlType");
				if (attribSqlType != null)
				{
					global::System.String valueOfSqlType;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribSqlType), out valueOfSqlType))
					{
						instanceOfModelProperty.SqlType = valueOfSqlType;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "sqlType", typeof(global::System.String), attribSqlType);
					}
				}
			}
			// Check
			if (!serializationContext.Result.Failed)
			{
				string attribCheck = reader.GetAttribute("check");
				if (attribCheck != null)
				{
					global::System.String valueOfCheck;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribCheck), out valueOfCheck))
					{
						instanceOfModelProperty.Check = valueOfCheck;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "check", typeof(global::System.String), attribCheck);
					}
				}
			}
			// DefaultMember
			if (!serializationContext.Result.Failed)
			{
				string attribDefaultMember = reader.GetAttribute("defaultMember");
				if (attribDefaultMember != null)
				{
					global::System.Boolean valueOfDefaultMember;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.Boolean>(DslModeling::SerializationUtilities.UnescapeXmlString(attribDefaultMember), out valueOfDefaultMember))
					{
						instanceOfModelProperty.DefaultMember = valueOfDefaultMember;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "defaultMember", typeof(global::System.Boolean), attribDefaultMember);
					}
				}
			}
		}
		/// <summary>
		/// Checks the version of the file being read.
		/// </summary>
		/// <param name="serializationContext">Serialization context.</param>
		/// <param name="reader">Reader for the file being read. The reader is positioned at the open tag of the root element being read.</param>
		private static void CheckVersion(DslModeling::SerializationContext serializationContext, global::System.Xml.XmlReader reader)
		{
			global::System.Version expectedVersion = new global::System.Version("1.0.0.0");
			string dslVersionStr = reader.GetAttribute("dslVersion");
			if (dslVersionStr != null)
			{
				try
				{
					global::System.Version actualVersion = new global::System.Version(dslVersionStr);
					if (actualVersion != expectedVersion)
					{
						AsyncDslSerializationBehaviorSerializationMessages.VersionMismatch(serializationContext, reader, expectedVersion, actualVersion);
					}
				}
				catch (global::System.ArgumentException)
				{
					AsyncDslSerializationBehaviorSerializationMessages.InvalidPropertyValue(serializationContext, reader, "dslVersion", typeof(global::System.Version), dslVersionStr);
				}
				catch (global::System.FormatException)
				{
					AsyncDslSerializationBehaviorSerializationMessages.InvalidPropertyValue(serializationContext, reader, "dslVersion", typeof(global::System.Version), dslVersionStr);
				}
				catch (global::System.OverflowException)
				{
					AsyncDslSerializationBehaviorSerializationMessages.InvalidPropertyValue(serializationContext, reader, "dslVersion", typeof(global::System.Version), dslVersionStr);
				}
			}
		}
Esempio n. 10
0
		protected virtual void ReadPropertiesFromAttributes(DslModeling::SerializationContext serializationContext, DslModeling::ModelElement element, global::System.Xml.XmlReader reader)
		{
			NestedClassReferencesModelClasses instanceOfNestedClassReferencesModelClasses = element as NestedClassReferencesModelClasses;
			global::System.Diagnostics.Debug.Assert(instanceOfNestedClassReferencesModelClasses != null, "Expecting an instance of NestedClassReferencesModelClasses");
	
			// MapType
			if (!serializationContext.Result.Failed)
			{
				string attribMapType = reader.GetAttribute("mapType");
				if (attribMapType != null)
				{
					global::System.String valueOfMapType;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribMapType), out valueOfMapType))
					{
						instanceOfNestedClassReferencesModelClasses.MapType = valueOfMapType;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "mapType", typeof(global::System.String), attribMapType);
					}
				}
			}
			// Insert
			if (!serializationContext.Result.Failed)
			{
				string attribInsert = reader.GetAttribute("insert");
				if (attribInsert != null)
				{
					global::System.Boolean valueOfInsert;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.Boolean>(DslModeling::SerializationUtilities.UnescapeXmlString(attribInsert), out valueOfInsert))
					{
						instanceOfNestedClassReferencesModelClasses.Insert = valueOfInsert;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "insert", typeof(global::System.Boolean), attribInsert);
					}
				}
			}
			// Update
			if (!serializationContext.Result.Failed)
			{
				string attribUpdate = reader.GetAttribute("update");
				if (attribUpdate != null)
				{
					global::System.Boolean valueOfUpdate;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.Boolean>(DslModeling::SerializationUtilities.UnescapeXmlString(attribUpdate), out valueOfUpdate))
					{
						instanceOfNestedClassReferencesModelClasses.Update = valueOfUpdate;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "update", typeof(global::System.Boolean), attribUpdate);
					}
				}
			}
			// ColumnPrefix
			if (!serializationContext.Result.Failed)
			{
				string attribColumnPrefix = reader.GetAttribute("columnPrefix");
				if (attribColumnPrefix != null)
				{
					global::System.String valueOfColumnPrefix;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribColumnPrefix), out valueOfColumnPrefix))
					{
						instanceOfNestedClassReferencesModelClasses.ColumnPrefix = valueOfColumnPrefix;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "columnPrefix", typeof(global::System.String), attribColumnPrefix);
					}
				}
			}
			// Description
			if (!serializationContext.Result.Failed)
			{
				string attribDescription = reader.GetAttribute("description");
				if (attribDescription != null)
				{
					global::System.String valueOfDescription;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribDescription), out valueOfDescription))
					{
						instanceOfNestedClassReferencesModelClasses.Description = valueOfDescription;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "description", typeof(global::System.String), attribDescription);
					}
				}
			}
			// PropertyName
			if (!serializationContext.Result.Failed)
			{
				string attribPropertyName = reader.GetAttribute("propertyName");
				if (attribPropertyName != null)
				{
					global::System.String valueOfPropertyName;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribPropertyName), out valueOfPropertyName))
					{
						instanceOfNestedClassReferencesModelClasses.PropertyName = valueOfPropertyName;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "propertyName", typeof(global::System.String), attribPropertyName);
					}
				}
			}
		}
Esempio n. 11
0
		protected virtual void ReadPropertiesFromAttributes(DslModeling::SerializationContext serializationContext, DslModeling::ModelElement element, global::System.Xml.XmlReader reader)
		{
			Association instanceOfAssociation = element as Association;
			global::System.Diagnostics.Debug.Assert(instanceOfAssociation != null, "Expecting an instance of Association");
	
			// SourceMultiplicity
			if (!serializationContext.Result.Failed)
			{
				string attribSourceMultiplicity = reader.GetAttribute("sourceMultiplicity");
				if (attribSourceMultiplicity != null)
				{
					Multiplicity valueOfSourceMultiplicity;
					if (DslModeling::SerializationUtilities.TryGetValue<Multiplicity>(DslModeling::SerializationUtilities.UnescapeXmlString(attribSourceMultiplicity), out valueOfSourceMultiplicity))
					{
						instanceOfAssociation.SourceMultiplicity = valueOfSourceMultiplicity;
					}
					else
					{	// Invalid property value, ignored.
						LinqToRdfSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "sourceMultiplicity", typeof(Multiplicity), attribSourceMultiplicity);
					}
				}
			}
			// SourceRoleName
			if (!serializationContext.Result.Failed)
			{
				string attribSourceRoleName = reader.GetAttribute("sourceRoleName");
				if (attribSourceRoleName != null)
				{
					global::System.String valueOfSourceRoleName;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribSourceRoleName), out valueOfSourceRoleName))
					{
						instanceOfAssociation.SourceRoleName = valueOfSourceRoleName;
					}
					else
					{	// Invalid property value, ignored.
						LinqToRdfSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "sourceRoleName", typeof(global::System.String), attribSourceRoleName);
					}
				}
			}
			// TargetMultiplicity
			if (!serializationContext.Result.Failed)
			{
				string attribTargetMultiplicity = reader.GetAttribute("targetMultiplicity");
				if (attribTargetMultiplicity != null)
				{
					Multiplicity valueOfTargetMultiplicity;
					if (DslModeling::SerializationUtilities.TryGetValue<Multiplicity>(DslModeling::SerializationUtilities.UnescapeXmlString(attribTargetMultiplicity), out valueOfTargetMultiplicity))
					{
						instanceOfAssociation.TargetMultiplicity = valueOfTargetMultiplicity;
					}
					else
					{	// Invalid property value, ignored.
						LinqToRdfSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "targetMultiplicity", typeof(Multiplicity), attribTargetMultiplicity);
					}
				}
			}
			// TargetRoleName
			if (!serializationContext.Result.Failed)
			{
				string attribTargetRoleName = reader.GetAttribute("targetRoleName");
				if (attribTargetRoleName != null)
				{
					global::System.String valueOfTargetRoleName;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribTargetRoleName), out valueOfTargetRoleName))
					{
						instanceOfAssociation.TargetRoleName = valueOfTargetRoleName;
					}
					else
					{	// Invalid property value, ignored.
						LinqToRdfSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "targetRoleName", typeof(global::System.String), attribTargetRoleName);
					}
				}
			}
			// ResourceUri
			if (!serializationContext.Result.Failed)
			{
				string attribResourceUri = reader.GetAttribute("resourceUri");
				if (attribResourceUri != null)
				{
					global::System.String valueOfResourceUri;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribResourceUri), out valueOfResourceUri))
					{
						instanceOfAssociation.ResourceUri = valueOfResourceUri;
					}
					else
					{	// Invalid property value, ignored.
						LinqToRdfSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "resourceUri", typeof(global::System.String), attribResourceUri);
					}
				}
			}
		}
Esempio n. 12
0
		protected override void ReadPropertiesFromAttributes(DslModeling::SerializationContext serializationContext, DslModeling::ModelElement element, global::System.Xml.XmlReader reader)
		{
			base.ReadPropertiesFromAttributes(serializationContext, element, reader);
	
			ClassOperation instanceOfClassOperation = element as ClassOperation;
			global::System.Diagnostics.Debug.Assert(instanceOfClassOperation != null, "Expecting an instance of ClassOperation");
	
			// IsAbstract
			if (!serializationContext.Result.Failed)
			{
				string attribIsAbstract = reader.GetAttribute("isAbstract");
				if (attribIsAbstract != null)
				{
					global::System.Boolean valueOfIsAbstract;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.Boolean>(DslModeling::SerializationUtilities.UnescapeXmlString(attribIsAbstract), out valueOfIsAbstract))
					{
						instanceOfClassOperation.IsAbstract = valueOfIsAbstract;
					}
					else
					{	// Invalid property value, ignored.
						FWK_DslSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "isAbstract", typeof(global::System.Boolean), attribIsAbstract);
					}
				}
			}
		}
		protected virtual void ReadPropertiesFromAttributes(DslModeling::SerializationContext serializationContext, DslModeling::ModelElement element, global::System.Xml.XmlReader reader)
		{
			Comment instanceOfComment = element as Comment;
			global::System.Diagnostics.Debug.Assert(instanceOfComment != null, "Expecting an instance of Comment");
	
			// Text
			if (!serializationContext.Result.Failed)
			{
				string attribText = reader.GetAttribute("text");
				if (attribText != null)
				{
					global::System.String valueOfText;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribText), out valueOfText))
					{
						instanceOfComment.Text = valueOfText;
					}
					else
					{	// Invalid property value, ignored.
						AsyncDslSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "text", typeof(global::System.String), attribText);
					}
				}
			}
		}
Esempio n. 14
0
		protected virtual void ReadPropertiesFromAttributes(DslModeling::SerializationContext serializationContext, DslModeling::ModelElement element, global::System.Xml.XmlReader reader)
		{
			ManyToManyRelation instanceOfManyToManyRelation = element as ManyToManyRelation;
			global::System.Diagnostics.Debug.Assert(instanceOfManyToManyRelation != null, "Expecting an instance of ManyToManyRelation");
	
			// SourceCache
			if (!serializationContext.Result.Failed)
			{
				string attribSourceCache = reader.GetAttribute("sourceCache");
				if (attribSourceCache != null)
				{
					CacheEnum valueOfSourceCache;
					if (DslModeling::SerializationUtilities.TryGetValue<CacheEnum>(DslModeling::SerializationUtilities.UnescapeXmlString(attribSourceCache), out valueOfSourceCache))
					{
						instanceOfManyToManyRelation.SourceCache = valueOfSourceCache;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "sourceCache", typeof(CacheEnum), attribSourceCache);
					}
				}
			}
			// SourceCascade
			if (!serializationContext.Result.Failed)
			{
				string attribSourceCascade = reader.GetAttribute("sourceCascade");
				if (attribSourceCascade != null)
				{
					ManyRelationCascadeEnum valueOfSourceCascade;
					if (DslModeling::SerializationUtilities.TryGetValue<ManyRelationCascadeEnum>(DslModeling::SerializationUtilities.UnescapeXmlString(attribSourceCascade), out valueOfSourceCascade))
					{
						instanceOfManyToManyRelation.SourceCascade = valueOfSourceCascade;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "sourceCascade", typeof(ManyRelationCascadeEnum), attribSourceCascade);
					}
				}
			}
			// SourceColumn
			if (!serializationContext.Result.Failed)
			{
				string attribSourceColumn = reader.GetAttribute("sourceColumn");
				if (attribSourceColumn != null)
				{
					global::System.String valueOfSourceColumn;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribSourceColumn), out valueOfSourceColumn))
					{
						instanceOfManyToManyRelation.SourceColumn = valueOfSourceColumn;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "sourceColumn", typeof(global::System.String), attribSourceColumn);
					}
				}
			}
			// SourceCustomAccess
			if (!serializationContext.Result.Failed)
			{
				string attribSourceCustomAccess = reader.GetAttribute("sourceCustomAccess");
				if (attribSourceCustomAccess != null)
				{
					global::System.String valueOfSourceCustomAccess;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribSourceCustomAccess), out valueOfSourceCustomAccess))
					{
						instanceOfManyToManyRelation.SourceCustomAccess = valueOfSourceCustomAccess;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "sourceCustomAccess", typeof(global::System.String), attribSourceCustomAccess);
					}
				}
			}
			// SourceInverse
			if (!serializationContext.Result.Failed)
			{
				string attribSourceInverse = reader.GetAttribute("sourceInverse");
				if (attribSourceInverse != null)
				{
					global::System.Boolean valueOfSourceInverse;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.Boolean>(DslModeling::SerializationUtilities.UnescapeXmlString(attribSourceInverse), out valueOfSourceInverse))
					{
						instanceOfManyToManyRelation.SourceInverse = valueOfSourceInverse;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "sourceInverse", typeof(global::System.Boolean), attribSourceInverse);
					}
				}
			}
			// SourceLazy
			if (!serializationContext.Result.Failed)
			{
				string attribSourceLazy = reader.GetAttribute("sourceLazy");
				if (attribSourceLazy != null)
				{
					global::System.Boolean valueOfSourceLazy;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.Boolean>(DslModeling::SerializationUtilities.UnescapeXmlString(attribSourceLazy), out valueOfSourceLazy))
					{
						instanceOfManyToManyRelation.SourceLazy = valueOfSourceLazy;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "sourceLazy", typeof(global::System.Boolean), attribSourceLazy);
					}
				}
			}
			// SourceMapType
			if (!serializationContext.Result.Failed)
			{
				string attribSourceMapType = reader.GetAttribute("sourceMapType");
				if (attribSourceMapType != null)
				{
					global::System.String valueOfSourceMapType;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribSourceMapType), out valueOfSourceMapType))
					{
						instanceOfManyToManyRelation.SourceMapType = valueOfSourceMapType;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "sourceMapType", typeof(global::System.String), attribSourceMapType);
					}
				}
			}
			// SourceOrderBy
			if (!serializationContext.Result.Failed)
			{
				string attribSourceOrderBy = reader.GetAttribute("sourceOrderBy");
				if (attribSourceOrderBy != null)
				{
					global::System.String valueOfSourceOrderBy;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribSourceOrderBy), out valueOfSourceOrderBy))
					{
						instanceOfManyToManyRelation.SourceOrderBy = valueOfSourceOrderBy;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "sourceOrderBy", typeof(global::System.String), attribSourceOrderBy);
					}
				}
			}
			// SourceRelationType
			if (!serializationContext.Result.Failed)
			{
				string attribSourceRelationType = reader.GetAttribute("sourceRelationType");
				if (attribSourceRelationType != null)
				{
					RelationType valueOfSourceRelationType;
					if (DslModeling::SerializationUtilities.TryGetValue<RelationType>(DslModeling::SerializationUtilities.UnescapeXmlString(attribSourceRelationType), out valueOfSourceRelationType))
					{
						instanceOfManyToManyRelation.SourceRelationType = valueOfSourceRelationType;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "sourceRelationType", typeof(RelationType), attribSourceRelationType);
					}
				}
			}
			// Schema
			if (!serializationContext.Result.Failed)
			{
				string attribSchema = reader.GetAttribute("schema");
				if (attribSchema != null)
				{
					global::System.String valueOfSchema;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribSchema), out valueOfSchema))
					{
						instanceOfManyToManyRelation.Schema = valueOfSchema;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "schema", typeof(global::System.String), attribSchema);
					}
				}
			}
			// SourceSort
			if (!serializationContext.Result.Failed)
			{
				string attribSourceSort = reader.GetAttribute("sourceSort");
				if (attribSourceSort != null)
				{
					global::System.String valueOfSourceSort;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribSourceSort), out valueOfSourceSort))
					{
						instanceOfManyToManyRelation.SourceSort = valueOfSourceSort;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "sourceSort", typeof(global::System.String), attribSourceSort);
					}
				}
			}
			// Table
			if (!serializationContext.Result.Failed)
			{
				string attribTable = reader.GetAttribute("table");
				if (attribTable != null)
				{
					global::System.String valueOfTable;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribTable), out valueOfTable))
					{
						instanceOfManyToManyRelation.Table = valueOfTable;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "table", typeof(global::System.String), attribTable);
					}
				}
			}
			// SourceWhere
			if (!serializationContext.Result.Failed)
			{
				string attribSourceWhere = reader.GetAttribute("sourceWhere");
				if (attribSourceWhere != null)
				{
					global::System.String valueOfSourceWhere;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribSourceWhere), out valueOfSourceWhere))
					{
						instanceOfManyToManyRelation.SourceWhere = valueOfSourceWhere;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "sourceWhere", typeof(global::System.String), attribSourceWhere);
					}
				}
			}
			// TargetCache
			if (!serializationContext.Result.Failed)
			{
				string attribTargetCache = reader.GetAttribute("targetCache");
				if (attribTargetCache != null)
				{
					CacheEnum valueOfTargetCache;
					if (DslModeling::SerializationUtilities.TryGetValue<CacheEnum>(DslModeling::SerializationUtilities.UnescapeXmlString(attribTargetCache), out valueOfTargetCache))
					{
						instanceOfManyToManyRelation.TargetCache = valueOfTargetCache;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "targetCache", typeof(CacheEnum), attribTargetCache);
					}
				}
			}
			// TargetCascade
			if (!serializationContext.Result.Failed)
			{
				string attribTargetCascade = reader.GetAttribute("targetCascade");
				if (attribTargetCascade != null)
				{
					ManyRelationCascadeEnum valueOfTargetCascade;
					if (DslModeling::SerializationUtilities.TryGetValue<ManyRelationCascadeEnum>(DslModeling::SerializationUtilities.UnescapeXmlString(attribTargetCascade), out valueOfTargetCascade))
					{
						instanceOfManyToManyRelation.TargetCascade = valueOfTargetCascade;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "targetCascade", typeof(ManyRelationCascadeEnum), attribTargetCascade);
					}
				}
			}
			// TargetColumn
			if (!serializationContext.Result.Failed)
			{
				string attribTargetColumn = reader.GetAttribute("targetColumn");
				if (attribTargetColumn != null)
				{
					global::System.String valueOfTargetColumn;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribTargetColumn), out valueOfTargetColumn))
					{
						instanceOfManyToManyRelation.TargetColumn = valueOfTargetColumn;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "targetColumn", typeof(global::System.String), attribTargetColumn);
					}
				}
			}
			// TargetCustomAccess
			if (!serializationContext.Result.Failed)
			{
				string attribTargetCustomAccess = reader.GetAttribute("targetCustomAccess");
				if (attribTargetCustomAccess != null)
				{
					global::System.String valueOfTargetCustomAccess;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribTargetCustomAccess), out valueOfTargetCustomAccess))
					{
						instanceOfManyToManyRelation.TargetCustomAccess = valueOfTargetCustomAccess;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "targetCustomAccess", typeof(global::System.String), attribTargetCustomAccess);
					}
				}
			}
			// TargetInverse
			if (!serializationContext.Result.Failed)
			{
				string attribTargetInverse = reader.GetAttribute("targetInverse");
				if (attribTargetInverse != null)
				{
					global::System.Boolean valueOfTargetInverse;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.Boolean>(DslModeling::SerializationUtilities.UnescapeXmlString(attribTargetInverse), out valueOfTargetInverse))
					{
						instanceOfManyToManyRelation.TargetInverse = valueOfTargetInverse;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "targetInverse", typeof(global::System.Boolean), attribTargetInverse);
					}
				}
			}
			// TargetLazy
			if (!serializationContext.Result.Failed)
			{
				string attribTargetLazy = reader.GetAttribute("targetLazy");
				if (attribTargetLazy != null)
				{
					global::System.Boolean valueOfTargetLazy;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.Boolean>(DslModeling::SerializationUtilities.UnescapeXmlString(attribTargetLazy), out valueOfTargetLazy))
					{
						instanceOfManyToManyRelation.TargetLazy = valueOfTargetLazy;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "targetLazy", typeof(global::System.Boolean), attribTargetLazy);
					}
				}
			}
			// TargetMapType
			if (!serializationContext.Result.Failed)
			{
				string attribTargetMapType = reader.GetAttribute("targetMapType");
				if (attribTargetMapType != null)
				{
					global::System.String valueOfTargetMapType;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribTargetMapType), out valueOfTargetMapType))
					{
						instanceOfManyToManyRelation.TargetMapType = valueOfTargetMapType;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "targetMapType", typeof(global::System.String), attribTargetMapType);
					}
				}
			}
			// TargetOrderBy
			if (!serializationContext.Result.Failed)
			{
				string attribTargetOrderBy = reader.GetAttribute("targetOrderBy");
				if (attribTargetOrderBy != null)
				{
					global::System.String valueOfTargetOrderBy;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribTargetOrderBy), out valueOfTargetOrderBy))
					{
						instanceOfManyToManyRelation.TargetOrderBy = valueOfTargetOrderBy;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "targetOrderBy", typeof(global::System.String), attribTargetOrderBy);
					}
				}
			}
			// TargetRelationType
			if (!serializationContext.Result.Failed)
			{
				string attribTargetRelationType = reader.GetAttribute("targetRelationType");
				if (attribTargetRelationType != null)
				{
					RelationType valueOfTargetRelationType;
					if (DslModeling::SerializationUtilities.TryGetValue<RelationType>(DslModeling::SerializationUtilities.UnescapeXmlString(attribTargetRelationType), out valueOfTargetRelationType))
					{
						instanceOfManyToManyRelation.TargetRelationType = valueOfTargetRelationType;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "targetRelationType", typeof(RelationType), attribTargetRelationType);
					}
				}
			}
			// TargetSort
			if (!serializationContext.Result.Failed)
			{
				string attribTargetSort = reader.GetAttribute("targetSort");
				if (attribTargetSort != null)
				{
					global::System.String valueOfTargetSort;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribTargetSort), out valueOfTargetSort))
					{
						instanceOfManyToManyRelation.TargetSort = valueOfTargetSort;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "targetSort", typeof(global::System.String), attribTargetSort);
					}
				}
			}
			// TargetWhere
			if (!serializationContext.Result.Failed)
			{
				string attribTargetWhere = reader.GetAttribute("targetWhere");
				if (attribTargetWhere != null)
				{
					global::System.String valueOfTargetWhere;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribTargetWhere), out valueOfTargetWhere))
					{
						instanceOfManyToManyRelation.TargetWhere = valueOfTargetWhere;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "targetWhere", typeof(global::System.String), attribTargetWhere);
					}
				}
			}
			// SourceDescription
			if (!serializationContext.Result.Failed)
			{
				string attribSourceDescription = reader.GetAttribute("sourceDescription");
				if (attribSourceDescription != null)
				{
					global::System.String valueOfSourceDescription;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribSourceDescription), out valueOfSourceDescription))
					{
						instanceOfManyToManyRelation.SourceDescription = valueOfSourceDescription;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "sourceDescription", typeof(global::System.String), attribSourceDescription);
					}
				}
			}
			// TargetDescription
			if (!serializationContext.Result.Failed)
			{
				string attribTargetDescription = reader.GetAttribute("targetDescription");
				if (attribTargetDescription != null)
				{
					global::System.String valueOfTargetDescription;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribTargetDescription), out valueOfTargetDescription))
					{
						instanceOfManyToManyRelation.TargetDescription = valueOfTargetDescription;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "targetDescription", typeof(global::System.String), attribTargetDescription);
					}
				}
			}
			// SourceAccess
			if (!serializationContext.Result.Failed)
			{
				string attribSourceAccess = reader.GetAttribute("sourceAccess");
				if (attribSourceAccess != null)
				{
					PropertyAccess valueOfSourceAccess;
					if (DslModeling::SerializationUtilities.TryGetValue<PropertyAccess>(DslModeling::SerializationUtilities.UnescapeXmlString(attribSourceAccess), out valueOfSourceAccess))
					{
						instanceOfManyToManyRelation.SourceAccess = valueOfSourceAccess;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "sourceAccess", typeof(PropertyAccess), attribSourceAccess);
					}
				}
			}
			// TargetAccess
			if (!serializationContext.Result.Failed)
			{
				string attribTargetAccess = reader.GetAttribute("targetAccess");
				if (attribTargetAccess != null)
				{
					PropertyAccess valueOfTargetAccess;
					if (DslModeling::SerializationUtilities.TryGetValue<PropertyAccess>(DslModeling::SerializationUtilities.UnescapeXmlString(attribTargetAccess), out valueOfTargetAccess))
					{
						instanceOfManyToManyRelation.TargetAccess = valueOfTargetAccess;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "targetAccess", typeof(PropertyAccess), attribTargetAccess);
					}
				}
			}
			// SourcePropertyType
			if (!serializationContext.Result.Failed)
			{
				string attribSourcePropertyType = reader.GetAttribute("sourcePropertyType");
				if (attribSourcePropertyType != null)
				{
					global::System.String valueOfSourcePropertyType;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribSourcePropertyType), out valueOfSourcePropertyType))
					{
						instanceOfManyToManyRelation.SourcePropertyType = valueOfSourcePropertyType;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "sourcePropertyType", typeof(global::System.String), attribSourcePropertyType);
					}
				}
			}
			// TargetPropertyType
			if (!serializationContext.Result.Failed)
			{
				string attribTargetPropertyType = reader.GetAttribute("targetPropertyType");
				if (attribTargetPropertyType != null)
				{
					global::System.String valueOfTargetPropertyType;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribTargetPropertyType), out valueOfTargetPropertyType))
					{
						instanceOfManyToManyRelation.TargetPropertyType = valueOfTargetPropertyType;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "targetPropertyType", typeof(global::System.String), attribTargetPropertyType);
					}
				}
			}
			// SourcePropertyName
			if (!serializationContext.Result.Failed)
			{
				string attribSourcePropertyName = reader.GetAttribute("sourcePropertyName");
				if (attribSourcePropertyName != null)
				{
					global::System.String valueOfSourcePropertyName;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribSourcePropertyName), out valueOfSourcePropertyName))
					{
						instanceOfManyToManyRelation.SourcePropertyName = valueOfSourcePropertyName;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "sourcePropertyName", typeof(global::System.String), attribSourcePropertyName);
					}
				}
			}
			// TargetPropertyName
			if (!serializationContext.Result.Failed)
			{
				string attribTargetPropertyName = reader.GetAttribute("targetPropertyName");
				if (attribTargetPropertyName != null)
				{
					global::System.String valueOfTargetPropertyName;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribTargetPropertyName), out valueOfTargetPropertyName))
					{
						instanceOfManyToManyRelation.TargetPropertyName = valueOfTargetPropertyName;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "targetPropertyName", typeof(global::System.String), attribTargetPropertyName);
					}
				}
			}
			// TargetNotFoundBehaviour
			if (!serializationContext.Result.Failed)
			{
				string attribTargetNotFoundBehaviour = reader.GetAttribute("targetNotFoundBehaviour");
				if (attribTargetNotFoundBehaviour != null)
				{
					NotFoundBehaviour valueOfTargetNotFoundBehaviour;
					if (DslModeling::SerializationUtilities.TryGetValue<NotFoundBehaviour>(DslModeling::SerializationUtilities.UnescapeXmlString(attribTargetNotFoundBehaviour), out valueOfTargetNotFoundBehaviour))
					{
						instanceOfManyToManyRelation.TargetNotFoundBehaviour = valueOfTargetNotFoundBehaviour;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "targetNotFoundBehaviour", typeof(NotFoundBehaviour), attribTargetNotFoundBehaviour);
					}
				}
			}
			// SourceNotFoundBehaviour
			if (!serializationContext.Result.Failed)
			{
				string attribSourceNotFoundBehaviour = reader.GetAttribute("sourceNotFoundBehaviour");
				if (attribSourceNotFoundBehaviour != null)
				{
					NotFoundBehaviour valueOfSourceNotFoundBehaviour;
					if (DslModeling::SerializationUtilities.TryGetValue<NotFoundBehaviour>(DslModeling::SerializationUtilities.UnescapeXmlString(attribSourceNotFoundBehaviour), out valueOfSourceNotFoundBehaviour))
					{
						instanceOfManyToManyRelation.SourceNotFoundBehaviour = valueOfSourceNotFoundBehaviour;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "sourceNotFoundBehaviour", typeof(NotFoundBehaviour), attribSourceNotFoundBehaviour);
					}
				}
			}
		}
Esempio n. 15
0
		protected override void ReadPropertiesFromAttributes(DslModeling::SerializationContext serializationContext, DslModeling::ModelElement element, global::System.Xml.XmlReader reader)
		{
			base.ReadPropertiesFromAttributes(serializationContext, element, reader);
	
			NestedClass instanceOfNestedClass = element as NestedClass;
			global::System.Diagnostics.Debug.Assert(instanceOfNestedClass != null, "Expecting an instance of NestedClass");
	
			// ImplementINotifyPropertyChanged
			if (!serializationContext.Result.Failed)
			{
				string attribImplementINotifyPropertyChanged = reader.GetAttribute("implementINotifyPropertyChanged");
				if (attribImplementINotifyPropertyChanged != null)
				{
					InheritableBoolean valueOfImplementINotifyPropertyChanged;
					if (DslModeling::SerializationUtilities.TryGetValue<InheritableBoolean>(DslModeling::SerializationUtilities.UnescapeXmlString(attribImplementINotifyPropertyChanged), out valueOfImplementINotifyPropertyChanged))
					{
						instanceOfNestedClass.ImplementINotifyPropertyChanged = valueOfImplementINotifyPropertyChanged;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "implementINotifyPropertyChanged", typeof(InheritableBoolean), attribImplementINotifyPropertyChanged);
					}
				}
			}
		}
Esempio n. 16
0
		protected override void ReadPropertiesFromAttributes(DslModeling::SerializationContext serializationContext, DslModeling::ModelElement element, global::System.Xml.XmlReader reader)
		{
			base.ReadPropertiesFromAttributes(serializationContext, element, reader);
	
			ModelElementWithAccess instanceOfModelElementWithAccess = element as ModelElementWithAccess;
			global::System.Diagnostics.Debug.Assert(instanceOfModelElementWithAccess != null, "Expecting an instance of ModelElementWithAccess");
	
			// CustomAccess
			if (!serializationContext.Result.Failed)
			{
				string attribCustomAccess = reader.GetAttribute("customAccess");
				if (attribCustomAccess != null)
				{
					global::System.String valueOfCustomAccess;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribCustomAccess), out valueOfCustomAccess))
					{
						instanceOfModelElementWithAccess.CustomAccess = valueOfCustomAccess;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "customAccess", typeof(global::System.String), attribCustomAccess);
					}
				}
			}
			// Access
			if (!serializationContext.Result.Failed)
			{
				string attribAccess = reader.GetAttribute("access");
				if (attribAccess != null)
				{
					PropertyAccess valueOfAccess;
					if (DslModeling::SerializationUtilities.TryGetValue<PropertyAccess>(DslModeling::SerializationUtilities.UnescapeXmlString(attribAccess), out valueOfAccess))
					{
						instanceOfModelElementWithAccess.Access = valueOfAccess;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "access", typeof(PropertyAccess), attribAccess);
					}
				}
			}
		}
Esempio n. 17
0
		protected override void ReadPropertiesFromAttributes(DslModeling::SerializationContext serializationContext, DslModeling::ModelElement element, global::System.Xml.XmlReader reader)
		{
			base.ReadPropertiesFromAttributes(serializationContext, element, reader);
	
			ClassModelElement instanceOfClassModelElement = element as ClassModelElement;
			global::System.Diagnostics.Debug.Assert(instanceOfClassModelElement != null, "Expecting an instance of ClassModelElement");
	
			// Description
			if (!serializationContext.Result.Failed)
			{
				string attribDescription = reader.GetAttribute("description");
				if (attribDescription != null)
				{
					global::System.String valueOfDescription;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribDescription), out valueOfDescription))
					{
						instanceOfClassModelElement.Description = valueOfDescription;
					}
					else
					{	// Invalid property value, ignored.
						LinqToRdfSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "description", typeof(global::System.String), attribDescription);
					}
				}
			}
		}
Esempio n. 18
0
		/// <summary>
		/// This method creates a Moniker of UnidirectionalAssociation based on the tag currently pointed by the reader.
		/// </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="sourceRolePlayer">The source role-player instance from which the moniker being created is referenced.</param>
		/// <param name="relDomainClassId">The DomainClass Id of the relationship that connects the sourceRolePlayer to the moniker being created.</param>
		/// <param name="partition">The new Moniker should be created in the Store associated with this partition.</param>			
		/// <returns>Created ModelRoot instance, or null if the reader is not pointing to a correct monikerized instance.</returns>
		protected override DslModeling::Moniker CreateMonikerInstance (DslModeling::SerializationContext serializationContext, global::System.Xml.XmlReader reader, DslModeling::ModelElement sourceRolePlayer, global::System.Guid relDomainClassId, DslModeling::Partition partition)
		{
			string monikerString = DslModeling::SerializationUtilities.UnescapeXmlString(reader.GetAttribute(this.MonikerAttributeName));
			if (string.IsNullOrEmpty(monikerString))
			{	
				LinqToRdfSerializationBehaviorSerializationMessages.MissingMoniker(serializationContext, reader, this.MonikerAttributeName);
				return null;
			}
			try
			{	// Normalize the Id.
				global::System.Guid id = new global::System.Guid(monikerString);
				monikerString = id.ToString("D", global::System.Globalization.CultureInfo.CurrentCulture);
				DslModeling::Moniker result = new DslModeling::Moniker(new DslModeling::MonikerKey(monikerString, relDomainClassId, UnidirectionalAssociation.DomainClassId, partition.Store), partition.Store);
				// Set location info if possible.
				result.Location = serializationContext.Location;
				global::System.Xml.IXmlLineInfo xmlLineInfo = reader as global::System.Xml.IXmlLineInfo;
				if (xmlLineInfo != null)
				{
					result.Line = xmlLineInfo.LineNumber;
					result.Column = xmlLineInfo.LinePosition;
				}
				return result;
			}
			catch (global::System.FormatException /* fEx */)
			{
				LinqToRdfSerializationBehaviorSerializationMessages.InvalidPropertyValue(serializationContext, reader, this.MonikerAttributeName, typeof(global::System.Guid), monikerString);
				return null;
			}
			catch (global::System.OverflowException /* oEx */)
			{	
				LinqToRdfSerializationBehaviorSerializationMessages.InvalidPropertyValue(serializationContext, reader, this.MonikerAttributeName, typeof(global::System.Guid), monikerString);
				return null;
			}
		}
Esempio n. 19
0
		/// <summary>
		/// This method creates a Moniker of ClassModelElement based on the tag currently pointed by the reader.
		/// </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="sourceRolePlayer">The source role-player instance from which the moniker being created is referenced.</param>
		/// <param name="relDomainClassId">The DomainClass Id of the relationship that connects the sourceRolePlayer to the moniker being created.</param>
		/// <param name="partition">The new Moniker should be created in the Store associated with this partition.</param>			
		/// <returns>Created ModelRoot instance, or null if the reader is not pointing to a correct monikerized instance.</returns>
		protected override DslModeling::Moniker CreateMonikerInstance (DslModeling::SerializationContext serializationContext, global::System.Xml.XmlReader reader, DslModeling::ModelElement sourceRolePlayer, global::System.Guid relDomainClassId, DslModeling::Partition partition)
		{
			string monikerString = DslModeling::SerializationUtilities.UnescapeXmlString(reader.GetAttribute(this.MonikerAttributeName));
			if (string.IsNullOrEmpty(monikerString))
			{	
				LinqToRdfSerializationBehaviorSerializationMessages.MissingMoniker(serializationContext, reader, this.MonikerAttributeName);
				return null;
			}
			DslModeling::DomainRelationshipXmlSerializer relSerializer = serializationContext.Directory.GetSerializer(relDomainClassId) as DslModeling::DomainRelationshipXmlSerializer;
			global::System.Diagnostics.Debug.Assert(relSerializer != null, "Cannot find serializer for DomainRelationship with Id " + relDomainClassId + "!");
			DslModeling::Moniker result = relSerializer.MonikerizeReference(serializationContext, sourceRolePlayer, ClassModelElement.DomainClassId, monikerString, partition.Store);
			// Set location info if possible.
			result.Location = serializationContext.Location;
			global::System.Xml.IXmlLineInfo xmlLineInfo = reader as global::System.Xml.IXmlLineInfo;
			if (xmlLineInfo != null)
			{
				result.Line = xmlLineInfo.LineNumber;
				result.Column = xmlLineInfo.LinePosition;
			}
			return result;
		}
		/// <summary>
		/// This method creates an instance of Transition based on the tag currently pointed by the reader. The reader is guaranteed (by the caller)
		/// to be pointed at a serialized instance of Transition.
		/// </summary>
		/// <remarks>
		/// The caller will guarantee that the reader is positioned at open XML tag of the ModelRoot instance 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 Transition instance should be created.</param>	
		/// <returns>Created Transition instance.</returns>
		protected override DslModeling::ModelElement CreateInstance(DslModeling::SerializationContext serializationContext, global::System.Xml.XmlReader reader, DslModeling::Partition partition)
		{
			string idStr = reader.GetAttribute (StateMachineLanguageSerializationBehavior.Instance.IdSerializationNameDefaultContext);
			try
			{
				global::System.Guid id;
				if (string.IsNullOrEmpty(idStr))
				{	// Create a default Id.
					id = StateMachineLanguageDomainModelIdProvider.Instance.GenerateNewKey();
					DslModeling::SerializationUtilities.AddMessage(serializationContext,DslModeling::SerializationMessageKind.Warning,
						"Missing 'Id' attribute, a new Guid " + id.ToString() + " is auto-generated. Element type (Transition)",
		    			reader as global::System.Xml.IXmlLineInfo);
					//StateMachineLanguageSerializationBehaviorSerializationMessages.MissingId(serializationContext, reader, id);
				}
				else
				{
					id = StateMachineLanguageSerializationHelper.Instance.ConvertIdFrom(serializationContext, idStr);
				}
				
				// Create the link with place-holder role-players.
				return new global::Tum.StateMachineDSL.Transition(
					partition,
					new DslModeling::RoleAssignment[] {
						DslModeling::RoleAssignment.CreatePlaceholderRoleAssignment (global::Tum.StateMachineDSL.Transition.StateBaseSourceDomainRoleId), 
						DslModeling::RoleAssignment.CreatePlaceholderRoleAssignment (global::Tum.StateMachineDSL.Transition.StateBaseTargetDomainRoleId)
					},
					new DslModeling::PropertyAssignment[] {
						new DslModeling::PropertyAssignment(DslModeling::ElementFactory.IdPropertyAssignment, id)
					}
				);
			}
			catch (global::System.ArgumentNullException /* anEx */)
			{	
				StateMachineLanguageSerializationBehaviorSerializationMessages.InvalidPropertyValue(serializationContext, reader, "Id", typeof(global::System.Guid), idStr);
			}
			catch (global::System.FormatException /* fEx */)
			{
				StateMachineLanguageSerializationBehaviorSerializationMessages.InvalidPropertyValue(serializationContext, reader, "Id", typeof(global::System.Guid), idStr);
			}
			catch (global::System.OverflowException /* ofEx */)
			{
				StateMachineLanguageSerializationBehaviorSerializationMessages.InvalidPropertyValue(serializationContext, reader, "Id", typeof(global::System.Guid), idStr);
			}
			return null;
		}
Esempio n. 21
0
		protected virtual void ReadPropertiesFromAttributes(DslModeling::SerializationContext serializationContext, DslModeling::ModelElement element, global::System.Xml.XmlReader reader)
		{
			NamedElement instanceOfNamedElement = element as NamedElement;
			global::System.Diagnostics.Debug.Assert(instanceOfNamedElement != null, "Expecting an instance of NamedElement");
	
			// Name
			if (!serializationContext.Result.Failed)
			{
				string attribName = reader.GetAttribute("name");
				if (attribName != null)
				{
					global::System.String valueOfName;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribName), out valueOfName))
					{
						instanceOfNamedElement.Name = valueOfName;
					}
					else
					{	// Invalid property value, ignored.
						LinqToRdfSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "name", typeof(global::System.String), attribName);
					}
				}
			}
		}
Esempio n. 22
0
		protected override void ReadPropertiesFromAttributes(DslModeling::SerializationContext serializationContext, DslModeling::ModelElement element, global::System.Xml.XmlReader reader)
		{
			base.ReadPropertiesFromAttributes(serializationContext, element, reader);
	
			ModelClass instanceOfModelClass = element as ModelClass;
			global::System.Diagnostics.Debug.Assert(instanceOfModelClass != null, "Expecting an instance of ModelClass");
	
			// Cache
			if (!serializationContext.Result.Failed)
			{
				string attribCache = reader.GetAttribute("cache");
				if (attribCache != null)
				{
					CacheEnum valueOfCache;
					if (DslModeling::SerializationUtilities.TryGetValue<CacheEnum>(DslModeling::SerializationUtilities.UnescapeXmlString(attribCache), out valueOfCache))
					{
						instanceOfModelClass.Cache = valueOfCache;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "cache", typeof(CacheEnum), attribCache);
					}
				}
			}
			// DiscriminatorColumn
			if (!serializationContext.Result.Failed)
			{
				string attribDiscriminatorColumn = reader.GetAttribute("discriminatorColumn");
				if (attribDiscriminatorColumn != null)
				{
					global::System.String valueOfDiscriminatorColumn;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribDiscriminatorColumn), out valueOfDiscriminatorColumn))
					{
						instanceOfModelClass.DiscriminatorColumn = valueOfDiscriminatorColumn;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "discriminatorColumn", typeof(global::System.String), attribDiscriminatorColumn);
					}
				}
			}
			// DiscriminatorType
			if (!serializationContext.Result.Failed)
			{
				string attribDiscriminatorType = reader.GetAttribute("discriminatorType");
				if (attribDiscriminatorType != null)
				{
					global::System.String valueOfDiscriminatorType;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribDiscriminatorType), out valueOfDiscriminatorType))
					{
						instanceOfModelClass.DiscriminatorType = valueOfDiscriminatorType;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "discriminatorType", typeof(global::System.String), attribDiscriminatorType);
					}
				}
			}
			// DiscriminatorValue
			if (!serializationContext.Result.Failed)
			{
				string attribDiscriminatorValue = reader.GetAttribute("discriminatorValue");
				if (attribDiscriminatorValue != null)
				{
					global::System.String valueOfDiscriminatorValue;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribDiscriminatorValue), out valueOfDiscriminatorValue))
					{
						instanceOfModelClass.DiscriminatorValue = valueOfDiscriminatorValue;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "discriminatorValue", typeof(global::System.String), attribDiscriminatorValue);
					}
				}
			}
			// Lazy
			if (!serializationContext.Result.Failed)
			{
				string attribLazy = reader.GetAttribute("lazy");
				if (attribLazy != null)
				{
					global::System.Boolean valueOfLazy;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.Boolean>(DslModeling::SerializationUtilities.UnescapeXmlString(attribLazy), out valueOfLazy))
					{
						instanceOfModelClass.Lazy = valueOfLazy;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "lazy", typeof(global::System.Boolean), attribLazy);
					}
				}
			}
			// Proxy
			if (!serializationContext.Result.Failed)
			{
				string attribProxy = reader.GetAttribute("proxy");
				if (attribProxy != null)
				{
					global::System.String valueOfProxy;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribProxy), out valueOfProxy))
					{
						instanceOfModelClass.Proxy = valueOfProxy;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "proxy", typeof(global::System.String), attribProxy);
					}
				}
			}
			// Schema
			if (!serializationContext.Result.Failed)
			{
				string attribSchema = reader.GetAttribute("schema");
				if (attribSchema != null)
				{
					global::System.String valueOfSchema;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribSchema), out valueOfSchema))
					{
						instanceOfModelClass.Schema = valueOfSchema;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "schema", typeof(global::System.String), attribSchema);
					}
				}
			}
			// Table
			if (!serializationContext.Result.Failed)
			{
				string attribTable = reader.GetAttribute("table");
				if (attribTable != null)
				{
					global::System.String valueOfTable;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribTable), out valueOfTable))
					{
						instanceOfModelClass.Table = valueOfTable;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "table", typeof(global::System.String), attribTable);
					}
				}
			}
			// Where
			if (!serializationContext.Result.Failed)
			{
				string attribWhere = reader.GetAttribute("where");
				if (attribWhere != null)
				{
					global::System.String valueOfWhere;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribWhere), out valueOfWhere))
					{
						instanceOfModelClass.Where = valueOfWhere;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "where", typeof(global::System.String), attribWhere);
					}
				}
			}
			// DynamicInsert
			if (!serializationContext.Result.Failed)
			{
				string attribDynamicInsert = reader.GetAttribute("dynamicInsert");
				if (attribDynamicInsert != null)
				{
					global::System.Boolean valueOfDynamicInsert;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.Boolean>(DslModeling::SerializationUtilities.UnescapeXmlString(attribDynamicInsert), out valueOfDynamicInsert))
					{
						instanceOfModelClass.DynamicInsert = valueOfDynamicInsert;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "dynamicInsert", typeof(global::System.Boolean), attribDynamicInsert);
					}
				}
			}
			// DynamicUpdate
			if (!serializationContext.Result.Failed)
			{
				string attribDynamicUpdate = reader.GetAttribute("dynamicUpdate");
				if (attribDynamicUpdate != null)
				{
					global::System.Boolean valueOfDynamicUpdate;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.Boolean>(DslModeling::SerializationUtilities.UnescapeXmlString(attribDynamicUpdate), out valueOfDynamicUpdate))
					{
						instanceOfModelClass.DynamicUpdate = valueOfDynamicUpdate;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "dynamicUpdate", typeof(global::System.Boolean), attribDynamicUpdate);
					}
				}
			}
			// Persister
			if (!serializationContext.Result.Failed)
			{
				string attribPersister = reader.GetAttribute("persister");
				if (attribPersister != null)
				{
					global::System.String valueOfPersister;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribPersister), out valueOfPersister))
					{
						instanceOfModelClass.Persister = valueOfPersister;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "persister", typeof(global::System.String), attribPersister);
					}
				}
			}
			// SelectBeforeUpdate
			if (!serializationContext.Result.Failed)
			{
				string attribSelectBeforeUpdate = reader.GetAttribute("selectBeforeUpdate");
				if (attribSelectBeforeUpdate != null)
				{
					global::System.Boolean valueOfSelectBeforeUpdate;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.Boolean>(DslModeling::SerializationUtilities.UnescapeXmlString(attribSelectBeforeUpdate), out valueOfSelectBeforeUpdate))
					{
						instanceOfModelClass.SelectBeforeUpdate = valueOfSelectBeforeUpdate;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "selectBeforeUpdate", typeof(global::System.Boolean), attribSelectBeforeUpdate);
					}
				}
			}
			// Polymorphism
			if (!serializationContext.Result.Failed)
			{
				string attribPolymorphism = reader.GetAttribute("polymorphism");
				if (attribPolymorphism != null)
				{
					Polymorphism valueOfPolymorphism;
					if (DslModeling::SerializationUtilities.TryGetValue<Polymorphism>(DslModeling::SerializationUtilities.UnescapeXmlString(attribPolymorphism), out valueOfPolymorphism))
					{
						instanceOfModelClass.Polymorphism = valueOfPolymorphism;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "polymorphism", typeof(Polymorphism), attribPolymorphism);
					}
				}
			}
			// Mutable
			if (!serializationContext.Result.Failed)
			{
				string attribMutable = reader.GetAttribute("mutable");
				if (attribMutable != null)
				{
					global::System.Boolean valueOfMutable;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.Boolean>(DslModeling::SerializationUtilities.UnescapeXmlString(attribMutable), out valueOfMutable))
					{
						instanceOfModelClass.Mutable = valueOfMutable;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "mutable", typeof(global::System.Boolean), attribMutable);
					}
				}
			}
			// BatchSize
			if (!serializationContext.Result.Failed)
			{
				string attribBatchSize = reader.GetAttribute("batchSize");
				if (attribBatchSize != null)
				{
					global::System.Int32 valueOfBatchSize;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.Int32>(DslModeling::SerializationUtilities.UnescapeXmlString(attribBatchSize), out valueOfBatchSize))
					{
						instanceOfModelClass.BatchSize = valueOfBatchSize;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "batchSize", typeof(global::System.Int32), attribBatchSize);
					}
				}
			}
			// Locking
			if (!serializationContext.Result.Failed)
			{
				string attribLocking = reader.GetAttribute("locking");
				if (attribLocking != null)
				{
					OptimisticLocking valueOfLocking;
					if (DslModeling::SerializationUtilities.TryGetValue<OptimisticLocking>(DslModeling::SerializationUtilities.UnescapeXmlString(attribLocking), out valueOfLocking))
					{
						instanceOfModelClass.Locking = valueOfLocking;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "locking", typeof(OptimisticLocking), attribLocking);
					}
				}
			}
			// UseAutoImport
			if (!serializationContext.Result.Failed)
			{
				string attribUseAutoImport = reader.GetAttribute("useAutoImport");
				if (attribUseAutoImport != null)
				{
					global::System.Boolean valueOfUseAutoImport;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.Boolean>(DslModeling::SerializationUtilities.UnescapeXmlString(attribUseAutoImport), out valueOfUseAutoImport))
					{
						instanceOfModelClass.UseAutoImport = valueOfUseAutoImport;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "useAutoImport", typeof(global::System.Boolean), attribUseAutoImport);
					}
				}
			}
			// BaseClassName
			if (!serializationContext.Result.Failed)
			{
				string attribBaseClassName = reader.GetAttribute("baseClassName");
				if (attribBaseClassName != null)
				{
					global::System.String valueOfBaseClassName;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribBaseClassName), out valueOfBaseClassName))
					{
						instanceOfModelClass.BaseClassName = valueOfBaseClassName;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "baseClassName", typeof(global::System.String), attribBaseClassName);
					}
				}
			}
			// UseGenerics
			if (!serializationContext.Result.Failed)
			{
				string attribUseGenerics = reader.GetAttribute("useGenerics");
				if (attribUseGenerics != null)
				{
					InheritableBoolean valueOfUseGenerics;
					if (DslModeling::SerializationUtilities.TryGetValue<InheritableBoolean>(DslModeling::SerializationUtilities.UnescapeXmlString(attribUseGenerics), out valueOfUseGenerics))
					{
						instanceOfModelClass.UseGenerics = valueOfUseGenerics;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "useGenerics", typeof(InheritableBoolean), attribUseGenerics);
					}
				}
			}
			// ImplementINotifyPropertyChanged
			if (!serializationContext.Result.Failed)
			{
				string attribImplementINotifyPropertyChanged = reader.GetAttribute("implementINotifyPropertyChanged");
				if (attribImplementINotifyPropertyChanged != null)
				{
					InheritableBoolean valueOfImplementINotifyPropertyChanged;
					if (DslModeling::SerializationUtilities.TryGetValue<InheritableBoolean>(DslModeling::SerializationUtilities.UnescapeXmlString(attribImplementINotifyPropertyChanged), out valueOfImplementINotifyPropertyChanged))
					{
						instanceOfModelClass.ImplementINotifyPropertyChanged = valueOfImplementINotifyPropertyChanged;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "implementINotifyPropertyChanged", typeof(InheritableBoolean), attribImplementINotifyPropertyChanged);
					}
				}
			}
			// UseGenericRelations
			if (!serializationContext.Result.Failed)
			{
				string attribUseGenericRelations = reader.GetAttribute("useGenericRelations");
				if (attribUseGenericRelations != null)
				{
					InheritableBoolean valueOfUseGenericRelations;
					if (DslModeling::SerializationUtilities.TryGetValue<InheritableBoolean>(DslModeling::SerializationUtilities.UnescapeXmlString(attribUseGenericRelations), out valueOfUseGenericRelations))
					{
						instanceOfModelClass.UseGenericRelations = valueOfUseGenericRelations;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "useGenericRelations", typeof(InheritableBoolean), attribUseGenericRelations);
					}
				}
			}
		}
Esempio n. 23
0
		protected virtual void ReadPropertiesFromAttributes(DslModeling::SerializationContext serializationContext, DslModeling::ModelElement element, global::System.Xml.XmlReader reader)
		{
			Generalization instanceOfGeneralization = element as Generalization;
			global::System.Diagnostics.Debug.Assert(instanceOfGeneralization != null, "Expecting an instance of Generalization");
	
			// Discriminator
			if (!serializationContext.Result.Failed)
			{
				string attribDiscriminator = reader.GetAttribute("discriminator");
				if (attribDiscriminator != null)
				{
					global::System.String valueOfDiscriminator;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribDiscriminator), out valueOfDiscriminator))
					{
						instanceOfGeneralization.Discriminator = valueOfDiscriminator;
					}
					else
					{	// Invalid property value, ignored.
						LinqToRdfSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "discriminator", typeof(global::System.String), attribDiscriminator);
					}
				}
			}
		}
Esempio n. 24
0
		protected virtual void ReadPropertiesFromAttributes(DslModeling::SerializationContext serializationContext, DslModeling::ModelElement element, global::System.Xml.XmlReader reader)
		{
			MultipleAssociationRole instanceOfMultipleAssociationRole = element as MultipleAssociationRole;
			global::System.Diagnostics.Debug.Assert(instanceOfMultipleAssociationRole != null, "Expecting an instance of MultipleAssociationRole");
	
			// Multiplicity
			if (!serializationContext.Result.Failed)
			{
				string attribMultiplicity = reader.GetAttribute("multiplicity");
				if (attribMultiplicity != null)
				{
					Multiplicity valueOfMultiplicity;
					if (DslModeling::SerializationUtilities.TryGetValue<Multiplicity>(DslModeling::SerializationUtilities.UnescapeXmlString(attribMultiplicity), out valueOfMultiplicity))
					{
						instanceOfMultipleAssociationRole.Multiplicity = valueOfMultiplicity;
					}
					else
					{	// Invalid property value, ignored.
						LinqToRdfSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "multiplicity", typeof(Multiplicity), attribMultiplicity);
					}
				}
			}
			// RoleName
			if (!serializationContext.Result.Failed)
			{
				string attribRoleName = reader.GetAttribute("roleName");
				if (attribRoleName != null)
				{
					global::System.String valueOfRoleName;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribRoleName), out valueOfRoleName))
					{
						instanceOfMultipleAssociationRole.RoleName = valueOfRoleName;
					}
					else
					{	// Invalid property value, ignored.
						LinqToRdfSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "roleName", typeof(global::System.String), attribRoleName);
					}
				}
			}
		}
		/// <summary>
		/// This method creates an instance of Test based on the tag currently pointed by the reader. The reader is guaranteed (by the caller)
		/// to be pointed at a serialized instance of Test.
		/// </summary>
		/// <remarks>
		/// The caller will guarantee that the reader is positioned at open XML tag of the ModelRoot instance 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 Test instance should be created.</param>	
		/// <returns>Created Test instance.</returns>
		protected override DslModeling::ModelElement CreateInstance(DslModeling::SerializationContext serializationContext, global::System.Xml.XmlReader reader, DslModeling::Partition partition)
		{
			string idStr = reader.GetAttribute (TestLanguageSerializationBehavior.Instance.IdSerializationNameDefaultContext);
			try
			{
				global::System.Guid id;
				if (string.IsNullOrEmpty(idStr))
				{	// Create a default Id.
					id = TestLanguageDomainModelIdProvider.Instance.GenerateNewKey();
					DslModeling::SerializationUtilities.AddMessage(serializationContext,DslModeling::SerializationMessageKind.Warning,
						"Missing 'Id' attribute, a new Guid " + id.ToString() + " is auto-generated. Element type (Test)",
		    			reader as global::System.Xml.IXmlLineInfo);
					//TestLanguageSerializationBehaviorSerializationMessages.MissingId(serializationContext, reader, id);
				}
				else
				{
					id = TestLanguageSerializationHelper.Instance.ConvertIdFrom(serializationContext, idStr);
				}
				return new global::Tum.TestLanguage.Test(partition, new DslModeling::PropertyAssignment(DslModeling::ElementFactory.IdPropertyAssignment, id));
			}
			catch (global::System.ArgumentNullException /* anEx */)
			{	
				TestLanguageSerializationBehaviorSerializationMessages.InvalidPropertyValue(serializationContext, reader, "Id", typeof(global::System.Guid), idStr);
			}
			catch (global::System.FormatException /* fEx */)
			{
				TestLanguageSerializationBehaviorSerializationMessages.InvalidPropertyValue(serializationContext, reader, "Id", typeof(global::System.Guid), idStr);
			}
			catch (global::System.OverflowException /* ofEx */)
			{
				TestLanguageSerializationBehaviorSerializationMessages.InvalidPropertyValue(serializationContext, reader, "Id", typeof(global::System.Guid), idStr);
			}
			return null;
		}
Esempio n. 26
0
		protected override void ReadPropertiesFromAttributes(DslModeling::SerializationContext serializationContext, DslModeling::ModelElement element, global::System.Xml.XmlReader reader)
		{
			base.ReadPropertiesFromAttributes(serializationContext, element, reader);
	
			ModelClass instanceOfModelClass = element as ModelClass;
			global::System.Diagnostics.Debug.Assert(instanceOfModelClass != null, "Expecting an instance of ModelClass");
	
			// Kind
			if (!serializationContext.Result.Failed)
			{
				string attribKind = reader.GetAttribute("kind");
				if (attribKind != null)
				{
					global::System.String valueOfKind;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribKind), out valueOfKind))
					{
						instanceOfModelClass.Kind = valueOfKind;
					}
					else
					{	// Invalid property value, ignored.
						LinqToRdfSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "kind", typeof(global::System.String), attribKind);
					}
				}
			}
			// IsAbstract
			if (!serializationContext.Result.Failed)
			{
				string attribIsAbstract = reader.GetAttribute("isAbstract");
				if (attribIsAbstract != null)
				{
					InheritanceModifier valueOfIsAbstract;
					if (DslModeling::SerializationUtilities.TryGetValue<InheritanceModifier>(DslModeling::SerializationUtilities.UnescapeXmlString(attribIsAbstract), out valueOfIsAbstract))
					{
						instanceOfModelClass.IsAbstract = valueOfIsAbstract;
					}
					else
					{	// Invalid property value, ignored.
						LinqToRdfSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "isAbstract", typeof(InheritanceModifier), attribIsAbstract);
					}
				}
			}
			// ResourceUri
			if (!serializationContext.Result.Failed)
			{
				string attribResourceUri = reader.GetAttribute("resourceUri");
				if (attribResourceUri != null)
				{
					global::System.String valueOfResourceUri;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribResourceUri), out valueOfResourceUri))
					{
						instanceOfModelClass.ResourceUri = valueOfResourceUri;
					}
					else
					{	// Invalid property value, ignored.
						LinqToRdfSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "resourceUri", typeof(global::System.String), attribResourceUri);
					}
				}
			}
		}
Esempio n. 27
0
		/// <summary>
		/// This method creates an instance of ManyToOneRelation based on the tag currently pointed by the reader. The reader is guaranteed (by the caller)
		/// to be pointed at a serialized instance of ManyToOneRelation.
		/// </summary>
		/// <remarks>
		/// The caller will guarantee that the reader is positioned at open XML tag of the ModelRoot instance 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 ManyToOneRelation instance should be created.</param>	
		/// <returns>Created ManyToOneRelation instance.</returns>
		protected override DslModeling::ModelElement CreateInstance(DslModeling::SerializationContext serializationContext, global::System.Xml.XmlReader reader, DslModeling::Partition partition)
		{
			string idStr = reader.GetAttribute ("Id");
			try
			{
				global::System.Guid id;
				if (string.IsNullOrEmpty(idStr))
				{	// Create a default Id.
					id = global::System.Guid.NewGuid();
					ActiveWriterSerializationBehaviorSerializationMessages.MissingId(serializationContext, reader, id);
				}
				else
				{
					id = new global::System.Guid (idStr);
				}
				// Create the link with place-holder role-players.
				return new ManyToOneRelation(
					partition,
					new DslModeling::RoleAssignment[] {
						DslModeling::RoleAssignment.CreatePlaceholderRoleAssignment (ManyToOneRelation.SourceDomainRoleId), 
						DslModeling::RoleAssignment.CreatePlaceholderRoleAssignment (ManyToOneRelation.TargetDomainRoleId)
					},
					new DslModeling::PropertyAssignment[] {
						new DslModeling::PropertyAssignment(DslModeling::ElementFactory.IdPropertyAssignment, id)
					}
				);
			}
			catch (global::System.ArgumentNullException /* anEx */)
			{	
				ActiveWriterSerializationBehaviorSerializationMessages.InvalidPropertyValue(serializationContext, reader, "Id", typeof(global::System.Guid), idStr);
			}
			catch (global::System.FormatException /* fEx */)
			{
				ActiveWriterSerializationBehaviorSerializationMessages.InvalidPropertyValue(serializationContext, reader, "Id", typeof(global::System.Guid), idStr);
			}
			catch (global::System.OverflowException /* ofEx */)
			{
				ActiveWriterSerializationBehaviorSerializationMessages.InvalidPropertyValue(serializationContext, reader, "Id", typeof(global::System.Guid), idStr);
			}
			return null;
		}
Esempio n. 28
0
		protected override void ReadPropertiesFromAttributes(DslModeling::SerializationContext serializationContext, DslModeling::ModelElement element, global::System.Xml.XmlReader reader)
		{
			base.ReadPropertiesFromAttributes(serializationContext, element, reader);
	
			ModelAttribute instanceOfModelAttribute = element as ModelAttribute;
			global::System.Diagnostics.Debug.Assert(instanceOfModelAttribute != null, "Expecting an instance of ModelAttribute");
	
			// Type
			if (!serializationContext.Result.Failed)
			{
				string attribType = reader.GetAttribute("type");
				if (attribType != null)
				{
					global::System.String valueOfType;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribType), out valueOfType))
					{
						instanceOfModelAttribute.Type = valueOfType;
					}
					else
					{	// Invalid property value, ignored.
						LinqToRdfSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "type", typeof(global::System.String), attribType);
					}
				}
			}
			// InitialValue
			if (!serializationContext.Result.Failed)
			{
				string attribInitialValue = reader.GetAttribute("initialValue");
				if (attribInitialValue != null)
				{
					global::System.String valueOfInitialValue;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribInitialValue), out valueOfInitialValue))
					{
						instanceOfModelAttribute.InitialValue = valueOfInitialValue;
					}
					else
					{	// Invalid property value, ignored.
						LinqToRdfSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "initialValue", typeof(global::System.String), attribInitialValue);
					}
				}
			}
			// Multiplicity
			if (!serializationContext.Result.Failed)
			{
				string attribMultiplicity = reader.GetAttribute("multiplicity");
				if (attribMultiplicity != null)
				{
					global::System.String valueOfMultiplicity;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribMultiplicity), out valueOfMultiplicity))
					{
						instanceOfModelAttribute.Multiplicity = valueOfMultiplicity;
					}
					else
					{	// Invalid property value, ignored.
						LinqToRdfSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "multiplicity", typeof(global::System.String), attribMultiplicity);
					}
				}
			}
			// ResourceUri
			if (!serializationContext.Result.Failed)
			{
				string attribResourceUri = reader.GetAttribute("resourceUri");
				if (attribResourceUri != null)
				{
					global::System.String valueOfResourceUri;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribResourceUri), out valueOfResourceUri))
					{
						instanceOfModelAttribute.ResourceUri = valueOfResourceUri;
					}
					else
					{	// Invalid property value, ignored.
						LinqToRdfSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "resourceUri", typeof(global::System.String), attribResourceUri);
					}
				}
			}
		}
		/// <summary>
		/// Reads and returns the value of an attribute.
		/// </summary>
		/// <param name="serializationContext">The current serialization context instance.</param>
		/// <param name="element">The element whose attributes have just been written.</param>
		/// <param name="reader">XmlReader to read the serialized data from.</param>
		/// <param name="attributeName">The name of the attribute to be read.</param>
		/// <returns>The value of the attribute.</returns>
		/// <remarks>This is an extension point to allow customisation e.g. to decode the data
		/// being written to the file.</remarks>
		public virtual string ReadAttribute(DslModeling::SerializationContext serializationContext, DslModeling::ModelElement element, global::System.Xml.XmlReader reader, string attributeName)
		{
			return reader.GetAttribute(attributeName);
		}
Esempio n. 30
0
		protected virtual void ReadPropertiesFromAttributes(DslModeling::SerializationContext serializationContext, DslModeling::ModelElement element, global::System.Xml.XmlReader reader)
		{
			OneToOneRelation instanceOfOneToOneRelation = element as OneToOneRelation;
			global::System.Diagnostics.Debug.Assert(instanceOfOneToOneRelation != null, "Expecting an instance of OneToOneRelation");
	
			// SourceAccess
			if (!serializationContext.Result.Failed)
			{
				string attribSourceAccess = reader.GetAttribute("sourceAccess");
				if (attribSourceAccess != null)
				{
					PropertyAccess valueOfSourceAccess;
					if (DslModeling::SerializationUtilities.TryGetValue<PropertyAccess>(DslModeling::SerializationUtilities.UnescapeXmlString(attribSourceAccess), out valueOfSourceAccess))
					{
						instanceOfOneToOneRelation.SourceAccess = valueOfSourceAccess;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "sourceAccess", typeof(PropertyAccess), attribSourceAccess);
					}
				}
			}
			// SourceCascade
			if (!serializationContext.Result.Failed)
			{
				string attribSourceCascade = reader.GetAttribute("sourceCascade");
				if (attribSourceCascade != null)
				{
					CascadeEnum valueOfSourceCascade;
					if (DslModeling::SerializationUtilities.TryGetValue<CascadeEnum>(DslModeling::SerializationUtilities.UnescapeXmlString(attribSourceCascade), out valueOfSourceCascade))
					{
						instanceOfOneToOneRelation.SourceCascade = valueOfSourceCascade;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "sourceCascade", typeof(CascadeEnum), attribSourceCascade);
					}
				}
			}
			// SourceConstrained
			if (!serializationContext.Result.Failed)
			{
				string attribSourceConstrained = reader.GetAttribute("sourceConstrained");
				if (attribSourceConstrained != null)
				{
					global::System.Boolean valueOfSourceConstrained;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.Boolean>(DslModeling::SerializationUtilities.UnescapeXmlString(attribSourceConstrained), out valueOfSourceConstrained))
					{
						instanceOfOneToOneRelation.SourceConstrained = valueOfSourceConstrained;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "sourceConstrained", typeof(global::System.Boolean), attribSourceConstrained);
					}
				}
			}
			// SourceCustomAccess
			if (!serializationContext.Result.Failed)
			{
				string attribSourceCustomAccess = reader.GetAttribute("sourceCustomAccess");
				if (attribSourceCustomAccess != null)
				{
					global::System.String valueOfSourceCustomAccess;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribSourceCustomAccess), out valueOfSourceCustomAccess))
					{
						instanceOfOneToOneRelation.SourceCustomAccess = valueOfSourceCustomAccess;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "sourceCustomAccess", typeof(global::System.String), attribSourceCustomAccess);
					}
				}
			}
			// SourceOuterJoin
			if (!serializationContext.Result.Failed)
			{
				string attribSourceOuterJoin = reader.GetAttribute("sourceOuterJoin");
				if (attribSourceOuterJoin != null)
				{
					OuterJoinEnum valueOfSourceOuterJoin;
					if (DslModeling::SerializationUtilities.TryGetValue<OuterJoinEnum>(DslModeling::SerializationUtilities.UnescapeXmlString(attribSourceOuterJoin), out valueOfSourceOuterJoin))
					{
						instanceOfOneToOneRelation.SourceOuterJoin = valueOfSourceOuterJoin;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "sourceOuterJoin", typeof(OuterJoinEnum), attribSourceOuterJoin);
					}
				}
			}
			// TargetAccess
			if (!serializationContext.Result.Failed)
			{
				string attribTargetAccess = reader.GetAttribute("targetAccess");
				if (attribTargetAccess != null)
				{
					PropertyAccess valueOfTargetAccess;
					if (DslModeling::SerializationUtilities.TryGetValue<PropertyAccess>(DslModeling::SerializationUtilities.UnescapeXmlString(attribTargetAccess), out valueOfTargetAccess))
					{
						instanceOfOneToOneRelation.TargetAccess = valueOfTargetAccess;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "targetAccess", typeof(PropertyAccess), attribTargetAccess);
					}
				}
			}
			// TargetCascade
			if (!serializationContext.Result.Failed)
			{
				string attribTargetCascade = reader.GetAttribute("targetCascade");
				if (attribTargetCascade != null)
				{
					CascadeEnum valueOfTargetCascade;
					if (DslModeling::SerializationUtilities.TryGetValue<CascadeEnum>(DslModeling::SerializationUtilities.UnescapeXmlString(attribTargetCascade), out valueOfTargetCascade))
					{
						instanceOfOneToOneRelation.TargetCascade = valueOfTargetCascade;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "targetCascade", typeof(CascadeEnum), attribTargetCascade);
					}
				}
			}
			// TargetConstrained
			if (!serializationContext.Result.Failed)
			{
				string attribTargetConstrained = reader.GetAttribute("targetConstrained");
				if (attribTargetConstrained != null)
				{
					global::System.Boolean valueOfTargetConstrained;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.Boolean>(DslModeling::SerializationUtilities.UnescapeXmlString(attribTargetConstrained), out valueOfTargetConstrained))
					{
						instanceOfOneToOneRelation.TargetConstrained = valueOfTargetConstrained;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "targetConstrained", typeof(global::System.Boolean), attribTargetConstrained);
					}
				}
			}
			// TargetCustomAccess
			if (!serializationContext.Result.Failed)
			{
				string attribTargetCustomAccess = reader.GetAttribute("targetCustomAccess");
				if (attribTargetCustomAccess != null)
				{
					global::System.String valueOfTargetCustomAccess;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribTargetCustomAccess), out valueOfTargetCustomAccess))
					{
						instanceOfOneToOneRelation.TargetCustomAccess = valueOfTargetCustomAccess;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "targetCustomAccess", typeof(global::System.String), attribTargetCustomAccess);
					}
				}
			}
			// TargetOuterJoin
			if (!serializationContext.Result.Failed)
			{
				string attribTargetOuterJoin = reader.GetAttribute("targetOuterJoin");
				if (attribTargetOuterJoin != null)
				{
					OuterJoinEnum valueOfTargetOuterJoin;
					if (DslModeling::SerializationUtilities.TryGetValue<OuterJoinEnum>(DslModeling::SerializationUtilities.UnescapeXmlString(attribTargetOuterJoin), out valueOfTargetOuterJoin))
					{
						instanceOfOneToOneRelation.TargetOuterJoin = valueOfTargetOuterJoin;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "targetOuterJoin", typeof(OuterJoinEnum), attribTargetOuterJoin);
					}
				}
			}
			// SourceDescription
			if (!serializationContext.Result.Failed)
			{
				string attribSourceDescription = reader.GetAttribute("sourceDescription");
				if (attribSourceDescription != null)
				{
					global::System.String valueOfSourceDescription;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribSourceDescription), out valueOfSourceDescription))
					{
						instanceOfOneToOneRelation.SourceDescription = valueOfSourceDescription;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "sourceDescription", typeof(global::System.String), attribSourceDescription);
					}
				}
			}
			// TargetDescription
			if (!serializationContext.Result.Failed)
			{
				string attribTargetDescription = reader.GetAttribute("targetDescription");
				if (attribTargetDescription != null)
				{
					global::System.String valueOfTargetDescription;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.String>(DslModeling::SerializationUtilities.UnescapeXmlString(attribTargetDescription), out valueOfTargetDescription))
					{
						instanceOfOneToOneRelation.TargetDescription = valueOfTargetDescription;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "targetDescription", typeof(global::System.String), attribTargetDescription);
					}
				}
			}
			// Lazy
			if (!serializationContext.Result.Failed)
			{
				string attribLazy = reader.GetAttribute("lazy");
				if (attribLazy != null)
				{
					global::System.Boolean valueOfLazy;
					if (DslModeling::SerializationUtilities.TryGetValue<global::System.Boolean>(DslModeling::SerializationUtilities.UnescapeXmlString(attribLazy), out valueOfLazy))
					{
						instanceOfOneToOneRelation.Lazy = valueOfLazy;
					}
					else
					{	// Invalid property value, ignored.
						ActiveWriterSerializationBehaviorSerializationMessages.IgnoredPropertyValue(serializationContext, reader, "lazy", typeof(global::System.Boolean), attribLazy);
					}
				}
			}
		}