public void GeneratePropertyGridViewModel(MetaModel dm, AttributedDomainElement domainElement)
{
		string name = "PropertyGrid" + domainElement.Name + "ViewModel";
		string baseClass = "DslEditorViewModelPGrid::PropertyGridViewModel";
		string constructorAccessor = "public";
		string modifier = " partial";		
		string classAccessor = "";
		string classDoubleDerivedAccessor = "";

		if( domainElement.GeneratesDoubleDerived )
		{
			name += "Base";
			modifier = "";
			constructorAccessor = "protected";
			classAccessor = " abstract";
		}
		
		if( domainElement.BaseElement != null )
		{
			baseClass = CodeGenerationUtilities.GetPropertyGridViewModelFullName(domainElement.BaseElement);	
		}
		
		if( domainElement.InheritanceModifier == InheritanceModifier.Abstract )
		{
			classAccessor = " abstract";
			classDoubleDerivedAccessor = " abstract";
		}
		
		DomainProperty nameProperty = CodeGenerationUtilities.GetNameProperty(domainElement);
		
		List<DomainProperty> createEditorForProperty = new List<DomainProperty>();
		List<DomainRole> createEditorForRole = new List<DomainRole>();
		

        
        #line default
        #line hidden
        
        #line 58 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("\t/// <summary>\r\n    /// Property grid view model for ");

        
        #line default
        #line hidden
        
        #line 60 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainElement.Name));

        
        #line default
        #line hidden
        
        #line 60 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("\r\n");

        
        #line default
        #line hidden
        
        #line 61 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"

		if( domainElement.GeneratesDoubleDerived )
		{

        
        #line default
        #line hidden
        
        #line 64 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("\t///\r\n\t/// This is the base abstract class.\r\n");

        
        #line default
        #line hidden
        
        #line 67 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"

		}

        
        #line default
        #line hidden
        
        #line 69 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("    /// </summary>\r\n\tpublic");

        
        #line default
        #line hidden
        
        #line 71 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(classAccessor));

        
        #line default
        #line hidden
        
        #line 71 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(modifier));

        
        #line default
        #line hidden
        
        #line 71 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(" class ");

        
        #line default
        #line hidden
        
        #line 71 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(name));

        
        #line default
        #line hidden
        
        #line 71 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(" : ");

        
        #line default
        #line hidden
        
        #line 71 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(baseClass));

        
        #line default
        #line hidden
        
        #line 71 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("\r\n\t{\r\n\t\t#region Constructor\r\n        /// <summary>\r\n        /// Constructor.\r\n   " +
        "     /// </summary>\r\n\t\t/// <param name=\"viewModelStore\">The store this view mode" +
        "l belongs to.</param>\r\n        /// <param name=\"element\">Model element of type ");

        
        #line default
        #line hidden
        
        #line 78 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainElement.Name));

        
        #line default
        #line hidden
        
        #line 78 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(" for which this property grid view model is created.</param>\t\r\n\t\t[System.Diagnost" +
        "ics.CodeAnalysis.SuppressMessage(\"Microsoft.Usage\", \"CA2214:DoNotCallOverridable" +
        "MethodsInConstructors\")]\r\n\t\t");

        
        #line default
        #line hidden
        
        #line 80 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(constructorAccessor));

        
        #line default
        #line hidden
        
        #line 80 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(" ");

        
        #line default
        #line hidden
        
        #line 80 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(name));

        
        #line default
        #line hidden
        
        #line 80 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("(DslEditorViewModelData::ViewModelStore viewModelStore, ");

        
        #line default
        #line hidden
        
        #line 80 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainElement.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 80 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(" element) : base(viewModelStore, element)\r\n\t\t{\r\n");

        
        #line default
        #line hidden
        
        #line 82 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"

		if( nameProperty != null )
		{

        
        #line default
        #line hidden
        
        #line 85 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("\t\t\t// subscribe to ");

        
        #line default
        #line hidden
        
        #line 86 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainElement.Name));

        
        #line default
        #line hidden
        
        #line 86 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(".");

        
        #line default
        #line hidden
        
        #line 86 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(nameProperty.Name));

        
        #line default
        #line hidden
        
        #line 86 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(" changes\r\n\t\t\tthis.EventManager.GetEvent<DslEditorViewModelEvents::ModelElementPro" +
        "pertyChangedEvent>().Subscribe(this.Store.DomainDataDirectory.GetDomainProperty(" +
        "");

        
        #line default
        #line hidden
        
        #line 87 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainElement.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 87 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(".");

        
        #line default
        #line hidden
        
        #line 87 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(nameProperty.Name));

        
        #line default
        #line hidden
        
        #line 87 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("DomainPropertyId), this.Element.Id, new System.Action<DslModeling::ElementPropert" +
        "yChangedEventArgs>(");

        
        #line default
        #line hidden
        
        #line 87 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(nameProperty.Name));

        
        #line default
        #line hidden
        
        #line 87 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("PropertyChanged));\r\n\t\t\t\r\n\t\t\t// set name property value\r\n\t\t\tthis.elementFullNameSt" +
        "orage = element.");

        
        #line default
        #line hidden
        
        #line 90 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(nameProperty.Name));

        
        #line default
        #line hidden
        
        #line 90 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(" + \" (");

        
        #line default
        #line hidden
        
        #line 90 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainElement.DisplayName));

        
        #line default
        #line hidden
        
        #line 90 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(")\";\r\n");

        
        #line default
        #line hidden
        
        #line 91 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"

		}

        
        #line default
        #line hidden
        
        #line 93 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("\t\t}\r\n\t\t#endregion\r\n\t\t\r\n\t\t#region Properties\r\n");

        
        #line default
        #line hidden
        
        #line 98 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"

		if( nameProperty != null )
		{

        
        #line default
        #line hidden
        
        #line 101 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("\t\tprivate void ");

        
        #line default
        #line hidden
        
        #line 102 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(nameProperty.Name));

        
        #line default
        #line hidden
        
        #line 102 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("PropertyChanged(DslModeling::ElementPropertyChangedEventArgs args)\r\n\t\t{\r\n\t\t\tif( a" +
        "rgs.NewValue != null )\r\n\t\t\t\tthis.ElementFullName = args.NewValue.ToString() + \" " +
        "(");

        
        #line default
        #line hidden
        
        #line 105 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainElement.DisplayName));

        
        #line default
        #line hidden
        
        #line 105 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(")\";\r\n\t\t\telse\r\n\t\t\t\tthis.ElementFullName = \"");

        
        #line default
        #line hidden
        
        #line 107 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainElement.DisplayName));

        
        #line default
        #line hidden
        
        #line 107 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("\";\r\n\t\t}\r\n\r\n\t\tprivate string elementFullNameStorage = string.Empty;\r\n\t\t\r\n");

        
        #line default
        #line hidden
        
        #line 112 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"

		}

        
        #line default
        #line hidden
        
        #line 114 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("\t\t/// <summary>\r\n        /// Gets or set the full name of the element, which prop" +
        "erties are to be added.\r\n        /// </summary>\r\n        public override string " +
        "ElementFullName \r\n\t\t{ \r\n");

        
        #line default
        #line hidden
        
        #line 120 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"

		if( nameProperty != null )
		{

        
        #line default
        #line hidden
        
        #line 123 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("\t\t\tget\r\n\t\t\t{\r\n\t\t\t\treturn elementFullNameStorage;\r\n\t\t\t}\r\n\t\t\tset\r\n\t\t\t{\r\n\t\t\t\telement" +
        "FullNameStorage = value;\r\n\t\t\t\tOnPropertyChanged(\"ElementFullName\");\r\n\t\t\t}\r\n");

        
        #line default
        #line hidden
        
        #line 133 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"

		}
		else
		{

        
        #line default
        #line hidden
        
        #line 137 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("\t\t\tget{ return \"");

        
        #line default
        #line hidden
        
        #line 138 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainElement.DisplayName));

        
        #line default
        #line hidden
        
        #line 138 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("\"; }\r\n\t\t\tset{}\r\n");

        
        #line default
        #line hidden
        
        #line 140 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"

		}

        
        #line default
        #line hidden
        
        #line 142 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("\t\t}\t\r\n\r\n\r\n        /// <summary>\r\n        /// Gets the description of the element," +
        " which properties are to be added.\r\n        /// </summary>\r\n        public overr" +
        "ide string ElementDescription \r\n\t\t{ \r\n\t\t\tget\r\n\t\t\t{\r\n\t\t\t\treturn ");

        
        #line default
        #line hidden
        
        #line 153 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(dm.Name));

        
        #line default
        #line hidden
        
        #line 153 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("DomainModel.SingletonResourceManager.GetString(\"");

        
        #line default
        #line hidden
        
        #line 153 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainElement.GetFullName(false)));

        
        #line default
        #line hidden
        
        #line 153 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(@".Description"");
			}
		}
		#endregion
		
		#region Methods
        /// <summary>
        /// Returns the collection of editor view models.
        /// </summary>
        /// <returns></returns>
        public override System.Collections.Generic.List<DslEditorViewModelPGrid::PropertyGridEditorViewModel> GetEditorViewModels()
		{
			System.Collections.Generic.List<DslEditorViewModelPGrid::PropertyGridEditorViewModel> collection = new System.Collections.Generic.List<DslEditorViewModelPGrid::PropertyGridEditorViewModel>();
");

        
        #line default
        #line hidden
        
        #line 166 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"

	if( domainElement.BaseElement != null )
	{

        
        #line default
        #line hidden
        
        #line 169 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("\t\t\tcollection = base.GetEditorViewModels();\r\n");

        
        #line default
        #line hidden
        
        #line 171 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"

	}

        
        #line default
        #line hidden
        
        #line 173 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("\t\t\t\r\n");

        
        #line default
        #line hidden
        
        #line 175 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"

	
		foreach(DomainProperty property in domainElement.Properties)
		{
			if( property.Type.PropertyGridEditor == null)
				continue;
			
			if( !property.IsBrowsable )
				continue;

			createEditorForProperty.Add(property);

        
        #line default
        #line hidden
        
        #line 186 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("\t\t\tCreateEditorViewModelFor");

        
        #line default
        #line hidden
        
        #line 187 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(property.Name));

        
        #line default
        #line hidden
        
        #line 187 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("(collection);\r\n");

        
        #line default
        #line hidden
        
        #line 188 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"

			
		}
		
		foreach(DomainRole role in domainElement.RolesPlayed)
		{
			if( !role.IsPropertyBrowsable || !role.IsPropertyGenerator)
				continue;
			
			if( role.Relationship is EmbeddingRelationship )
			{
				if( role.Relationship.Target.CustomPropertyGridEditor == null )
					continue;
				
				if( role.Relationship.Source != role)
					continue;

				//if( role.Relationship.Source.RolePlayer != domainElement)
				//	continue;
			}
			
			createEditorForRole.Add(role);

        
        #line default
        #line hidden
        
        #line 210 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("\t\t\tCreateEditorViewModelFor");

        
        #line default
        #line hidden
        
        #line 211 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(role.PropertyName));

        
        #line default
        #line hidden
        
        #line 211 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("Role(collection);\r\n");

        
        #line default
        #line hidden
        
        #line 212 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"

		}
		

        
        #line default
        #line hidden
        
        #line 215 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("\r\n\t\t\treturn collection;\r\n\t\t}\r\n\t\t#endregion\r\n");

        
        #line default
        #line hidden
        
        #line 220 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"

		if( createEditorForProperty.Count > 0 || createEditorForRole.Count > 0 )
		{

        
        #line default
        #line hidden
        
        #line 223 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("\r\n\t\t#region Editor Creation\r\n");

        
        #line default
        #line hidden
        
        #line 226 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"

			foreach(DomainProperty property in createEditorForProperty)
			{
				string wpfPropertyEditor = property.Type.PropertyGridEditor.Namespace + "." + property.Type.PropertyGridEditor.Name;
				string resourceKey = domainElement.GetFullName(false)+"/"+property.Name;

        
        #line default
        #line hidden
        
        #line 231 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("\t\t/// <summary>\r\n\t\t/// Create property grid editor view model for ");

        
        #line default
        #line hidden
        
        #line 233 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainElement.Name));

        
        #line default
        #line hidden
        
        #line 233 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(".");

        
        #line default
        #line hidden
        
        #line 233 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(property.Name));

        
        #line default
        #line hidden
        
        #line 233 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("\r\n\t\t/// </summary>\r\n\t\t[System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft" +
        ".Reliability\", \"CA2000:Dispose objects before losing scope\")]\r\n\t\tprotected virtu" +
        "al void CreateEditorViewModelFor");

        
        #line default
        #line hidden
        
        #line 236 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(property.Name));

        
        #line default
        #line hidden
        
        #line 236 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("(System.Collections.Generic.List<DslEditorViewModelPGrid::PropertyGridEditorViewM" +
        "odel> collection)\r\n\t\t{\r\n\t\t\t");

        
        #line default
        #line hidden
        
        #line 238 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(wpfPropertyEditor));

        
        #line default
        #line hidden
        
        #line 238 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(" editor = new ");

        
        #line default
        #line hidden
        
        #line 238 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(wpfPropertyEditor));

        
        #line default
        #line hidden
        
        #line 238 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("(this.ViewModelStore");

        
        #line default
        #line hidden
        
        #line 238 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
 if(property.Type is DomainEnumeration){
        
        #line default
        #line hidden
        
        #line 238 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(" , typeof(");

        
        #line default
        #line hidden
        
        #line 238 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(property.Type.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 238 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("), ");

        
        #line default
        #line hidden
        
        #line 238 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture((property.Type as DomainEnumeration).IsFlags.ToString().ToLower()));

        
        #line default
        #line hidden
        
        #line 238 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
 } 
        
        #line default
        #line hidden
        
        #line 238 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(");\r\n\t\t\t\r\n            editor.PropertyName = \"");

        
        #line default
        #line hidden
        
        #line 240 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(property.Name));

        
        #line default
        #line hidden
        
        #line 240 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("\";\r\n\t\t\teditor.PropertyDisplayName = ");

        
        #line default
        #line hidden
        
        #line 241 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(dm.Name));

        
        #line default
        #line hidden
        
        #line 241 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("DomainModel.SingletonResourceManager.GetString(\"");

        
        #line default
        #line hidden
        
        #line 241 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(resourceKey));

        
        #line default
        #line hidden
        
        #line 241 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(".DisplayName\");\r\n\t\t\teditor.PropertyDescription = ");

        
        #line default
        #line hidden
        
        #line 242 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(dm.Name));

        
        #line default
        #line hidden
        
        #line 242 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("DomainModel.SingletonResourceManager.GetString(\"");

        
        #line default
        #line hidden
        
        #line 242 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(resourceKey));

        
        #line default
        #line hidden
        
        #line 242 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(".Description\");\r\n\t\t\teditor.PropertyCategory = \"");

        
        #line default
        #line hidden
        
        #line 243 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(property.Category));

        
        #line default
        #line hidden
        
        #line 243 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("\";\r\n\t\t\teditor.IsPropertyRequired = ");

        
        #line default
        #line hidden
        
        #line 244 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(property.IsRequired.ToString().ToLower()));

        
        #line default
        #line hidden
        
        #line 244 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(";\r\n\t\t\teditor.IsPropertyReadOnly = ");

        
        #line default
        #line hidden
        
        #line 245 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(property.IsUIReadOnly.ToString().ToLower()));

        
        #line default
        #line hidden
        
        #line 245 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(";\t\t\r\n\t\t\t\t\r\n\t\t\tcollection.Add(editor);\r\n\t\t}\r\n\t\t\r\n");

        
        #line default
        #line hidden
        
        #line 250 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"

			}
			
			foreach(DomainRole role in createEditorForRole)
			{
				string resourceKey = role.Relationship.GetFullName(false)+"/"+role.Opposite.Name;
				string resourcePropertyKey = role.Relationship.GetFullName(false)+"/"+role.Name;
				
				bool bIsRequired = false;
				if( role.Multiplicity == Tum.PDE.LanguageDSL.Multiplicity.OneMany || role.Multiplicity == Tum.PDE.LanguageDSL.Multiplicity.One )
					bIsRequired = true;		
				
				if( role.Relationship.Target.CustomPropertyGridEditor != null )
				{
					if( role.Relationship.Target.CustomPropertyGridEditor.Name == "ReferencedModelRoleViewModel" && 
						role.Relationship.Target.CustomPropertyGridEditor.Namespace == "Tum.PDE.ToolFramework.Modeling.Visualization.VMXExtensions.Path" )
					{						
						if( role.Relationship.Source != role)
							continue;

        
        #line default
        #line hidden
        
        #line 269 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("\t\t/// <summary>\r\n\t\t/// Create property grid editor view model for ");

        
        #line default
        #line hidden
        
        #line 271 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainElement.Name));

        
        #line default
        #line hidden
        
        #line 271 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(".");

        
        #line default
        #line hidden
        
        #line 271 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(role.PropertyName));

        
        #line default
        #line hidden
        
        #line 271 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("\r\n\t\t/// </summary>\r\n\t\t[System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft" +
        ".Reliability\", \"CA2000:Dispose objects before losing scope\")]\r\n\t\tprotected virtu" +
        "al void CreateEditorViewModelFor");

        
        #line default
        #line hidden
        
        #line 274 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(role.PropertyName));

        
        #line default
        #line hidden
        
        #line 274 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("Role(System.Collections.Generic.List<DslEditorViewModelPGrid::PropertyGridEditorV" +
        "iewModel> collection)\r\n\t\t{\r\n\t\t\t");

        
        #line default
        #line hidden
        
        #line 276 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(role.Relationship.Name));

        
        #line default
        #line hidden
        
        #line 276 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(role.Relationship.Target.Name));

        
        #line default
        #line hidden
        
        #line 276 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("RMRViewModel editor = new ");

        
        #line default
        #line hidden
        
        #line 276 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(role.Relationship.Name));

        
        #line default
        #line hidden
        
        #line 276 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(role.Relationship.Target.Name));

        
        #line default
        #line hidden
        
        #line 276 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("RMRViewModel(this.ViewModelStore);\r\n\t\t\t\r\n\t\t\teditor.PropertyName = \"");

        
        #line default
        #line hidden
        
        #line 278 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(role.PropertyName));

        
        #line default
        #line hidden
        
        #line 278 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("\";\r\n\t\t\teditor.PropertyDisplayName = ");

        
        #line default
        #line hidden
        
        #line 279 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(dm.Name));

        
        #line default
        #line hidden
        
        #line 279 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("DomainModel.SingletonResourceManager.GetString(\"");

        
        #line default
        #line hidden
        
        #line 279 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(resourcePropertyKey));

        
        #line default
        #line hidden
        
        #line 279 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(".PropertyDisplayName\");\r\n\t\t\teditor.PropertyDescription = ");

        
        #line default
        #line hidden
        
        #line 280 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(dm.Name));

        
        #line default
        #line hidden
        
        #line 280 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("DomainModel.SingletonResourceManager.GetString(\"");

        
        #line default
        #line hidden
        
        #line 280 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(resourceKey));

        
        #line default
        #line hidden
        
        #line 280 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(".Description\");\r\n\t\t\teditor.PropertyCategory = \"");

        
        #line default
        #line hidden
        
        #line 281 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(role.Opposite.Category));

        
        #line default
        #line hidden
        
        #line 281 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("\";\r\n\t\t\teditor.IsPropertyRequired = ");

        
        #line default
        #line hidden
        
        #line 282 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(bIsRequired.ToString().ToLower()));

        
        #line default
        #line hidden
        
        #line 282 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(";\r\n\t\t\teditor.IsPropertyReadOnly = false;\r\n\t\t\r\n\t\t\tcollection.Add(editor);\r\n\t\t}\r\n");

        
        #line default
        #line hidden
        
        #line 287 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"

						
						continue;
					}
					
				}
				
				string wpfPropertyEditor = "Tum.PDE.ToolFramework.Modeling.Visualization.ViewModel.PropertyGrid.UnaryRoleEditorViewModel";
				
				if( role.Multiplicity == Tum.PDE.LanguageDSL.Multiplicity.OneMany || role.Multiplicity == Tum.PDE.LanguageDSL.Multiplicity.ZeroMany )
					wpfPropertyEditor = "Tum.PDE.ToolFramework.Modeling.Visualization.ViewModel.PropertyGrid.MultipleRoleEditorViewModel";
				
				if( role.CustomPropertyGridEditor != null)
					wpfPropertyEditor = role.CustomPropertyGridEditor.Namespace + "." + role.CustomPropertyGridEditor.Name;
				
				bool bIsReadOnly = role.IsPropertyUIReadOnly;
				if( !(role.Opposite.RolePlayer is DomainClass) )
					bIsReadOnly = true;

        
        #line default
        #line hidden
        
        #line 305 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("\t\t/// <summary>\r\n\t\t/// Create property grid editor view model for ");

        
        #line default
        #line hidden
        
        #line 307 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainElement.Name));

        
        #line default
        #line hidden
        
        #line 307 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(".");

        
        #line default
        #line hidden
        
        #line 307 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(role.PropertyName));

        
        #line default
        #line hidden
        
        #line 307 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("\r\n\t\t/// </summary>\r\n\t\t[System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft" +
        ".Reliability\", \"CA2000:Dispose objects before losing scope\")]\r\n\t\tprotected virtu" +
        "al void CreateEditorViewModelFor");

        
        #line default
        #line hidden
        
        #line 310 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(role.PropertyName));

        
        #line default
        #line hidden
        
        #line 310 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("Role(System.Collections.Generic.List<DslEditorViewModelPGrid::PropertyGridEditorV" +
        "iewModel> collection)\r\n\t\t{\r\n\t\t\t");

        
        #line default
        #line hidden
        
        #line 312 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(wpfPropertyEditor));

        
        #line default
        #line hidden
        
        #line 312 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(" editor = new ");

        
        #line default
        #line hidden
        
        #line 312 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(wpfPropertyEditor));

        
        #line default
        #line hidden
        
        #line 312 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("(this.ViewModelStore, \r\n\t\t\t\t\t\t\t\t\tthis.Store.DomainDataDirectory.GetDomainRelation" +
        "ship(");

        
        #line default
        #line hidden
        
        #line 313 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(role.Relationship.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 313 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(".DomainClassId),\r\n\t\t\t\t\t   \t\t\t\t");

        
        #line default
        #line hidden
        
        #line 314 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(role.Relationship.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 314 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(".");

        
        #line default
        #line hidden
        
        #line 314 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(role.Name));

        
        #line default
        #line hidden
        
        #line 314 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("DomainRoleId);\r\n\t\t\t\r\n\t\t\teditor.PropertyName = \"");

        
        #line default
        #line hidden
        
        #line 316 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(role.PropertyName));

        
        #line default
        #line hidden
        
        #line 316 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("\";\r\n\t\t\teditor.PropertyDisplayName = ");

        
        #line default
        #line hidden
        
        #line 317 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(dm.Name));

        
        #line default
        #line hidden
        
        #line 317 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("DomainModel.SingletonResourceManager.GetString(\"");

        
        #line default
        #line hidden
        
        #line 317 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(resourcePropertyKey));

        
        #line default
        #line hidden
        
        #line 317 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(".PropertyDisplayName\");\r\n\t\t\teditor.PropertyDescription = ");

        
        #line default
        #line hidden
        
        #line 318 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(dm.Name));

        
        #line default
        #line hidden
        
        #line 318 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("DomainModel.SingletonResourceManager.GetString(\"");

        
        #line default
        #line hidden
        
        #line 318 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(resourceKey));

        
        #line default
        #line hidden
        
        #line 318 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(".Description\");\r\n\t\t\teditor.PropertyCategory = \"");

        
        #line default
        #line hidden
        
        #line 319 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(role.Opposite.Category));

        
        #line default
        #line hidden
        
        #line 319 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("\";\r\n\t\t\teditor.IsPropertyRequired = ");

        
        #line default
        #line hidden
        
        #line 320 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(bIsRequired.ToString().ToLower()));

        
        #line default
        #line hidden
        
        #line 320 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(";\r\n\t\t\teditor.IsPropertyReadOnly = ");

        
        #line default
        #line hidden
        
        #line 321 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(bIsReadOnly.ToString().ToLower()));

        
        #line default
        #line hidden
        
        #line 321 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(";\t\t\t\r\n\t\t\r\n\t\t\tcollection.Add(editor);\r\n\t\t}\r\n");

        
        #line default
        #line hidden
        
        #line 325 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"

			}

        
        #line default
        #line hidden
        
        #line 327 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("\t\t\t\t\r\n\t\t#endregion\t\t\r\n");

        
        #line default
        #line hidden
        
        #line 329 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"

		}
		if( nameProperty != null )
		{

        
        #line default
        #line hidden
        
        #line 333 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("\r\n\t\t#region Dispose\r\n\t\t/// <summary>\r\n\t\t/// Unregister from events although they " +
        "are weak.\r\n\t\t/// </summary>\r\n\t\tprotected override void OnDispose()\r\n\t\t{\r\n");

        
        #line default
        #line hidden
        
        #line 341 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"

			if( nameProperty != null )
			{

        
        #line default
        #line hidden
        
        #line 344 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("\t\t\tthis.EventManager.GetEvent<DslEditorViewModelEvents::ModelElementPropertyChang" +
        "edEvent>().Unsubscribe(this.Store.DomainDataDirectory.GetDomainProperty(");

        
        #line default
        #line hidden
        
        #line 345 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainElement.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 345 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(".");

        
        #line default
        #line hidden
        
        #line 345 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(nameProperty.Name));

        
        #line default
        #line hidden
        
        #line 345 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("DomainPropertyId), this.Element.Id, new System.Action<DslModeling::ElementPropert" +
        "yChangedEventArgs>(");

        
        #line default
        #line hidden
        
        #line 345 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(nameProperty.Name));

        
        #line default
        #line hidden
        
        #line 345 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("PropertyChanged));\r\n");

        
        #line default
        #line hidden
        
        #line 346 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"

			}

        
        #line default
        #line hidden
        
        #line 348 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("\t\t\tbase.OnDispose();\r\n\t\t}\r\n\t\t#endregion\r\n");

        
        #line default
        #line hidden
        
        #line 352 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"

		}

        
        #line default
        #line hidden
        
        #line 354 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("\t}\r\n");

        
        #line default
        #line hidden
        
        #line 356 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"

		if( domainElement.GeneratesDoubleDerived )
		{

        
        #line default
        #line hidden
        
        #line 359 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("\r\n\t/// <summary>\r\n    /// Property grid view model for ");

        
        #line default
        #line hidden
        
        #line 362 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainElement.Name));

        
        #line default
        #line hidden
        
        #line 362 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("\r\n\t///\r\n\t///\tThis is the double generated class for easier customization.\r\n\t/// <" +
        "/summary>\r\n\tpublic");

        
        #line default
        #line hidden
        
        #line 366 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(classDoubleDerivedAccessor));

        
        #line default
        #line hidden
        
        #line 366 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(" partial class PropertyGrid");

        
        #line default
        #line hidden
        
        #line 366 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainElement.Name));

        
        #line default
        #line hidden
        
        #line 366 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("ViewModel : ");

        
        #line default
        #line hidden
        
        #line 366 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(name));

        
        #line default
        #line hidden
        
        #line 366 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("\r\n\t{\r\n\t\t#region Constructor\r\n        /// <summary>\r\n        /// Constructor.\r\n   " +
        "     /// </summary>\r\n\t\t/// <param name=\"viewModelStore\">The store this view mode" +
        "l belongs to.</param>\r\n        /// <param name=\"element\">Model element of type ");

        
        #line default
        #line hidden
        
        #line 373 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainElement.Name));

        
        #line default
        #line hidden
        
        #line 373 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(" for which this property grid view model is created.</param>\t\t\r\n\t\tpublic Property" +
        "Grid");

        
        #line default
        #line hidden
        
        #line 374 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainElement.Name));

        
        #line default
        #line hidden
        
        #line 374 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write("ViewModel(DslEditorViewModelData::ViewModelStore viewModelStore, ");

        
        #line default
        #line hidden
        
        #line 374 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainElement.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 374 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"
this.Write(" element) : base(viewModelStore, element)\r\n\t\t{\r\n\t\t\t\r\n\t\t}\r\n\t\t#endregion\r\n\t}\r\n");

        
        #line default
        #line hidden
        
        #line 380 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\PropertyGridViewModelGenerator.tt"

		}
}
private void CreatePropertyAccessorsInternal(AttributedDomainElement domainElement, bool hasBaseClass)
{

        
        #line default
        #line hidden
        
        #line 184 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"
this.Write("#region Element Properties\r\n");

        
        #line default
        #line hidden
        
        #line 186 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"

	AttributedDomainElement temp = domainElement;
	System.Collections.Generic.List<string> handledProperty = new System.Collections.Generic.List<string>();
	while(temp != null )
	{
		foreach(DomainProperty property in temp.Properties)
		{
			if( handledProperty.Contains(property.Name) )
				continue;
			
			handledProperty.Add(property.Name);
			
			AccessModifier setterAccessModifier = property.SetterAccessModifier;
			AccessModifier getterAccessModifier = property.GetterAccessModifier;
			AccessModifier overallAccessModifier;
			
			if(setterAccessModifier==AccessModifier.Public || getterAccessModifier==AccessModifier.Public)
			{
				overallAccessModifier = AccessModifier.Public;
			}
			else if(setterAccessModifier==AccessModifier.FamilyOrAssembly || getterAccessModifier==AccessModifier.FamilyOrAssembly)
			{
				overallAccessModifier = AccessModifier.FamilyOrAssembly;	
			}
			else if(setterAccessModifier==AccessModifier.Family || getterAccessModifier==AccessModifier.Family)
			{
				overallAccessModifier = AccessModifier.Family;
			}
			else if(setterAccessModifier==AccessModifier.Assembly || getterAccessModifier==AccessModifier.Assembly)
			{
				overallAccessModifier = AccessModifier.Assembly;
			}
			else 
			{
				overallAccessModifier = AccessModifier.Private;
			}			
			
			string modifier = "";
			if( hasBaseClass )
				modifier = " new";
			
			//if( p.IsElementName )

        
        #line default
        #line hidden
        
        #line 228 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"
this.Write("/// <summary>\r\n/// Gets or sets the value of ");

        
        #line default
        #line hidden
        
        #line 230 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(property.Name));

        
        #line default
        #line hidden
        
        #line 230 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"
this.Write(" domain property.\r\n/// </summary>\r\n");

        
        #line default
        #line hidden
        
        #line 232 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(CodeGenerationUtilities.GetAccessModifier(overallAccessModifier)));

        
        #line default
        #line hidden
        
        #line 232 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(modifier));

        
        #line default
        #line hidden
        
        #line 232 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"
this.Write(" ");

        
        #line default
        #line hidden
        
        #line 232 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(CodeGenerationUtilities.GetDomainTypeFullName(property)));

        
        #line default
        #line hidden
        
        #line 232 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"
this.Write(" Element_");

        
        #line default
        #line hidden
        
        #line 232 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(property.Name));

        
        #line default
        #line hidden
        
        #line 232 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"
this.Write("\r\n{\r\n");

        
        #line default
        #line hidden
        
        #line 234 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"

	if(getterAccessModifier!=overallAccessModifier)
	{

        
        #line default
        #line hidden
        
        #line 237 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"
this.Write("\t");

        
        #line default
        #line hidden
        
        #line 238 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(CodeGenerationUtilities.GetAccessModifier(getterAccessModifier)));

        
        #line default
        #line hidden
        
        #line 238 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"
this.Write(" get\r\n");

        
        #line default
        #line hidden
        
        #line 239 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"

	}
	else
	{

        
        #line default
        #line hidden
        
        #line 243 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"
this.Write("\tget\r\n");

        
        #line default
        #line hidden
        
        #line 245 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"

	}

        
        #line default
        #line hidden
        
        #line 247 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"
this.Write("\t{\r\n");

        
        #line default
        #line hidden
        
        #line 249 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"

	if( property.IsElementName )
	{

        
        #line default
        #line hidden
        
        #line 252 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"
this.Write("\t\treturn this.DomainElementName;\r\n");

        
        #line default
        #line hidden
        
        #line 254 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"

	}
	else
	{

        
        #line default
        #line hidden
        
        #line 258 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"
this.Write("\t\treturn (this.Element as ");

        
        #line default
        #line hidden
        
        #line 259 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainElement.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 259 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"
this.Write(").");

        
        #line default
        #line hidden
        
        #line 259 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(property.Name));

        
        #line default
        #line hidden
        
        #line 259 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"
this.Write(";\r\n");

        
        #line default
        #line hidden
        
        #line 260 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"

	}

        
        #line default
        #line hidden
        
        #line 262 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"
this.Write("\t}\r\n");

        
        #line default
        #line hidden
        
        #line 264 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"

		if(setterAccessModifier != overallAccessModifier)
		{

        
        #line default
        #line hidden
        
        #line 267 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"
this.Write("\t");

        
        #line default
        #line hidden
        
        #line 268 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(CodeGenerationUtilities.GetAccessModifier(setterAccessModifier)));

        
        #line default
        #line hidden
        
        #line 268 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"
this.Write(" set\r\n");

        
        #line default
        #line hidden
        
        #line 269 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"

		}
		else
		{

        
        #line default
        #line hidden
        
        #line 273 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"
this.Write("\tset\r\n");

        
        #line default
        #line hidden
        
        #line 275 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"

		}

        
        #line default
        #line hidden
        
        #line 277 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"
this.Write("\t{\r\n");

        
        #line default
        #line hidden
        
        #line 279 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"


	if( property.IsElementName )
	{

        
        #line default
        #line hidden
        
        #line 283 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"
this.Write("\t\tif( this.DomainElementName != value )\r\n\t\t\tthis.DomainElementName = value;\r\n");

        
        #line default
        #line hidden
        
        #line 286 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"

	}
	else
	{

        
        #line default
        #line hidden
        
        #line 290 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"
this.Write("\t\tif( (this.Element as ");

        
        #line default
        #line hidden
        
        #line 291 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainElement.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 291 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"
this.Write(").");

        
        #line default
        #line hidden
        
        #line 291 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(property.Name));

        
        #line default
        #line hidden
        
        #line 291 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"
this.Write(" != value )\r\n\t\t{\r\n\t\t\tusing( DslModeling::Transaction transaction = this.Store.Tra" +
        "nsactionManager.BeginTransaction(\"Update value of ");

        
        #line default
        #line hidden
        
        #line 293 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(property.Name));

        
        #line default
        #line hidden
        
        #line 293 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"
this.Write("\") )\r\n\t\t\t{\r\n\t\t\t\t(this.Element as ");

        
        #line default
        #line hidden
        
        #line 295 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainElement.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 295 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"
this.Write(").");

        
        #line default
        #line hidden
        
        #line 295 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(property.Name));

        
        #line default
        #line hidden
        
        #line 295 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"
this.Write(" = value;\r\n\t\t\t\t\r\n\t\t\t\ttransaction.Commit();\r\n\t\t\t}\r\n\t\t}\r\n");

        
        #line default
        #line hidden
        
        #line 300 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"

	}

        
        #line default
        #line hidden
        
        #line 302 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"
this.Write("\t}\r\n}\r\n\r\n");

        
        #line default
        #line hidden
        
        #line 306 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"

		}
		
		temp = temp.BaseElement;
	}

        
        #line default
        #line hidden
        
        #line 311 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"
this.Write("#endregion\r\n");

        
        #line default
        #line hidden
        
        #line 313 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\ViewModel\DiagramGeneratorHelper.tt"
		
}
private string GenerateDomainClassSerializerInternal(AttributedDomainElement domainClass, string namespaceString)
{
	string classTypeString = domainClass.GetFullName (true);
	bool isRelationship = (domainClass is DomainRelationship);
	bool isAbstract = (domainClass.InheritanceModifier == InheritanceModifier.Abstract);
	bool isSealed = (domainClass.InheritanceModifier == InheritanceModifier.Sealed);
	
	string serializerGenerationClassName = this.MetaModel.Name + domainClass.Name + "Serializer";
	if( domainClass.GeneratesDoubleDerived )
		serializerGenerationClassName = this.MetaModel.Name + domainClass.Name + "BaseSerializer";
	string serializerClassName = this.MetaModel.Name + domainClass.Name + "Serializer";
	string baseSerializerClassName = CodeGenerationUtilities.GetSerializerBaseName(domainClass);

	bool bContinue = true;
	if( isRelationship )
	{
		if( !(domainClass as DomainRelationship).NeedsFullSerialization() )
		{
			if( domainClass is ReferenceRelationship )
				if( !(domainClass as ReferenceRelationship).SerializedReferenceRelationship.IsInFullSerialization )
					bContinue = false;
				
			if( domainClass is EmbeddingRelationship )
				if( !(domainClass as EmbeddingRelationship).SerializedEmbeddingRelationship.IsInFullSerialization )
					bContinue = false;				
		}
	}
	
	if( !bContinue )
		return null;
	
	// calculate properties
	DomainProperty propertySerializedAsInnerValue = null;
	foreach(DomainProperty p in domainClass.Properties)
	{
		if(p.SerializationRepresentationType == SerializationRepresentationType.InnerValue )
		{
			propertySerializedAsInnerValue = p;
			continue;
		}
	}
			
	bool bOmitIdProperty = false;
	LinkedElementCollection<SerializationElement> Children = null;
	LinkedElementCollection<SerializationAttributeElement> Attributes = null;
	if( domainClass is DomainClass )
	{
		SerializedDomainClass d = (domainClass as DomainClass).SerializedDomainClass;
		if( d.IdProperty.OmitIdProperty )
			bOmitIdProperty = true;
		Children = d.Children;
		Attributes = d.Attributes;		
	}
	
	if( domainClass is ReferenceRelationship )
	{
		SerializedReferenceRelationship d = (domainClass as ReferenceRelationship).SerializedReferenceRelationship;
		if( d.IdProperty.OmitIdProperty )
			bOmitIdProperty = true;
		Children = d.Children;
		Attributes = d.Attributes;		
	}
	
	if( domainClass is EmbeddingRelationship )
	{
		SerializedEmbeddingRelationship d = (domainClass as EmbeddingRelationship).SerializedEmbeddingRelationship;
		if( d.IdProperty.OmitIdProperty )
			bOmitIdProperty = true;
		Children = d.Children;
		Attributes = d.Attributes;
	}

        
        #line default
        #line hidden
        
        #line 91 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("namespace ");

        
        #line default
        #line hidden
        
        #line 92 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(namespaceString));

        
        #line default
        #line hidden
        
        #line 92 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\r\n{\r\n");

        
        #line default
        #line hidden
        
        #line 94 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
	
	PushIndent("\t");
	int inheritanceDepth = CodeGenerationUtilities.CalculateInheritanceDepth (domainClass);

        
        #line default
        #line hidden
        
        #line 97 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("/// <summary>\r\n/// Serializer ");

        
        #line default
        #line hidden
        
        #line 99 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(serializerGenerationClassName));

        
        #line default
        #line hidden
        
        #line 99 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" for DomainClass ");

        
        #line default
        #line hidden
        
        #line 99 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.GetRelativeName(namespaceString, false)));

        
        #line default
        #line hidden
        
        #line 99 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".\r\n/// </summary>\r\n");

        
        #line default
        #line hidden
        
        #line 101 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

	if (domainClass.GeneratesDoubleDerived)
	{
		if (inheritanceDepth > 6)
		{

        
        #line default
        #line hidden
        
        #line 106 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("[global::System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Maintainabili" +
        "ty\", \"CA1501:AvoidExcessiveInheritance\", Justification = \"Generated code.\")]\r\n");

        
        #line default
        #line hidden
        
        #line 108 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

		}
	}
	else if (inheritanceDepth > 5)
	{

        
        #line default
        #line hidden
        
        #line 113 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("[global::System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Maintainabili" +
        "ty\", \"CA1501:AvoidExcessiveInheritance\", Justification = \"Generated code.\")]\r\n");

        
        #line default
        #line hidden
        
        #line 115 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

	}

        
        #line default
        #line hidden
        
        #line 118 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(CodeGenerationUtilities.GetAccessModifier(domainClass.AccessModifier)));

        
        #line default
        #line hidden
        
        #line 118 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.GeneratesDoubleDerived ? " abstract" : (domainClass.InheritanceModifier == InheritanceModifier.Sealed ? " sealed" : string.Empty)));

        
        #line default
        #line hidden
        
        #line 118 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" partial class ");

        
        #line default
        #line hidden
        
        #line 118 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(serializerGenerationClassName));

        
        #line default
        #line hidden
        
        #line 118 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" : ");

        
        #line default
        #line hidden
        
        #line 118 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(baseSerializerClassName));

        
        #line default
        #line hidden
        
        #line 118 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\r\n{\r\n\t#region Constructor\r\n\t/// <summary>\r\n\t/// ");

        
        #line default
        #line hidden
        
        #line 122 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(serializerGenerationClassName));

        
        #line default
        #line hidden
        
        #line 122 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" Constructor\r\n\t/// </summary>\r\n\t");

        
        #line default
        #line hidden
        
        #line 124 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.GeneratesDoubleDerived ? "protected" : "public"));

        
        #line default
        #line hidden
        
        #line 124 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" ");

        
        #line default
        #line hidden
        
        #line 124 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(serializerGenerationClassName));

        
        #line default
        #line hidden
        
        #line 124 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" ()\r\n\t\t: base ()\r\n\t{\r\n\t}\r\n\t#endregion\r\n\t\r\n\t#region Public Properties\r\n");

        
        #line default
        #line hidden
        
        #line 131 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
 
	if( !isAbstract )
	{

        
        #line default
        #line hidden
        
        #line 134 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\r\n\t/// <summary>\r\n\t/// This is the XML tag name used to serialize an instance of" +
        " ");

        
        #line default
        #line hidden
        
        #line 136 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 136 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".\r\n\t/// </summary>\r\n\tpublic override string XmlTagName\r\n\t{\r\n\t\tget{\r\n\t\t\treturn \"");

        
        #line default
        #line hidden
        
        #line 141 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.SerializationName));

        
        #line default
        #line hidden
        
        #line 141 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\";\r\n\t\t}\r\n\t}\r\n");

        
        #line default
        #line hidden
        
        #line 144 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

	}
	else
	{

        
        #line default
        #line hidden
        
        #line 148 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\r\n\t/// <summary>\r\n\t/// Cannot be serialized.\r\n\t/// </summary>\r\n\tpublic override " +
        "string XmlTagName\r\n\t{\r\n\t\t[global::System.Diagnostics.DebuggerStepThrough]\r\n\t\tget" +
        " { return string.Empty; }\r\n\t}\r\n");

        
        #line default
        #line hidden
        
        #line 157 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
		
	}

        
        #line default
        #line hidden
        
        #line 159 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t\r\n\t#endregion\r\n");

        
        #line default
        #line hidden
        
        #line 161 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

	

        
        #line default
        #line hidden
        
        #line 163 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\r\n\t#region Read\r\n\t/// <summary>\r\n\t/// Public Read() method that deserializes one " +
        "");

        
        #line default
        #line hidden
        
        #line 167 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 167 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" instance from XML.\r\n\t/// </summary>\r\n\t/// <remarks>\r\n\t/// When this method is ca" +
        "lled, caller guarantees that the passed-in XML reader is positioned at the open " +
        "XML tag\r\n\t/// of the ");

        
        #line default
        #line hidden
        
        #line 171 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 171 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(@" element that is about to be deserialized. 
	/// The method needs to ensure that when it returns, the reader is positioned at the open XML tag of the next sibling element,
	/// or the close tag of the parent element (or EOF).
	/// </remarks>
	/// <param name=""serializationContext"">Serialization context.</param>
	/// <param name=""element"">In-memory ");

        
        #line default
        #line hidden
        
        #line 176 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 176 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(@" instance that will get the deserialized data.</param>
	/// <param name=""reader"">XmlReader to read serialized data from.</param>
	public override void Read(DslModeling::SerializationContext serializationContext, DslModeling::ModelElement element, global::System.Xml.XmlReader reader)
	{
");

        
        #line default
        #line hidden
        
        #line 180 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
 
	if( isAbstract )
	{

        
        #line default
        #line hidden
        
        #line 183 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\tthrow new global::System.NotSupportedException();\r\n");

        
        #line default
        #line hidden
        
        #line 185 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

	}
	else
	{

        
        #line default
        #line hidden
        
        #line 189 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(@"		#region Check Parameters
		global::System.Diagnostics.Debug.Assert (serializationContext != null);
		if (serializationContext == null)
			throw new global::System.ArgumentNullException (""serializationContext"");
		global::System.Diagnostics.Debug.Assert (element != null);
		if (element == null)
			throw new global::System.ArgumentNullException (""element"");
		global::System.Diagnostics.Debug.Assert (reader != null);
		if (reader == null)
			throw new global::System.ArgumentNullException (""reader"");
		#endregion

  		// Read properties serialized as XML attributes.
		ReadPropertiesFromAttributes(serializationContext, element, reader);
		
		// Read nested XML elements.
		if (!serializationContext.Result.Failed)
		{
			if (!reader.IsEmptyElement)
			{
");

        
        #line default
        #line hidden
        
        #line 210 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

			if( propertySerializedAsInnerValue != null )
			{
				string isReq = "false";
				if( propertySerializedAsInnerValue.IsRequired )
					isReq = "true";

        
        #line default
        #line hidden
        
        #line 216 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t\t\t// Read inner value property\r\n\t\t\t\t");

        
        #line default
        #line hidden
        
        #line 218 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 218 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" instance = element as ");

        
        #line default
        #line hidden
        
        #line 218 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 218 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(";\t\r\n");

        
        #line default
        #line hidden
        
        #line 219 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

				if( propertySerializedAsInnerValue.Type.SerializationStyle == SerializationStyle.CDATA )					
				{

        
        #line default
        #line hidden
        
        #line 222 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t\t\tstring str");

        
        #line default
        #line hidden
        
        #line 223 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(propertySerializedAsInnerValue.Name));

        
        #line default
        #line hidden
        
        #line 223 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" = ");

        
        #line default
        #line hidden
        
        #line 223 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(this.MetaModel.Name));

        
        #line default
        #line hidden
        
        #line 223 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("SerializationHelper.Instance.ReadCDATAFromInnerXmlAsString(serializationContext, " +
        "instance, reader);\r\n");

        
        #line default
        #line hidden
        
        #line 224 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

				}
				else
				{

        
        #line default
        #line hidden
        
        #line 228 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t\t\tstring str");

        
        #line default
        #line hidden
        
        #line 229 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(propertySerializedAsInnerValue.Name));

        
        #line default
        #line hidden
        
        #line 229 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" = ");

        
        #line default
        #line hidden
        
        #line 229 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(this.MetaModel.Name));

        
        #line default
        #line hidden
        
        #line 229 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("SerializationHelper.Instance.ReadInnerXmlAsString(serializationContext, instance," +
        " reader);\r\n");

        
        #line default
        #line hidden
        
        #line 230 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

				}

        
        #line default
        #line hidden
        
        #line 232 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t\t\t");

        
        #line default
        #line hidden
        
        #line 233 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(CodeGenerationUtilities.GetDomainTypeFullName(propertySerializedAsInnerValue)));

        
        #line default
        #line hidden
        
        #line 233 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" valueOf");

        
        #line default
        #line hidden
        
        #line 233 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(propertySerializedAsInnerValue.Name));

        
        #line default
        #line hidden
        
        #line 233 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" = ");

        
        #line default
        #line hidden
        
        #line 233 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(this.MetaModel.Name));

        
        #line default
        #line hidden
        
        #line 233 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("SerializationHelper.Instance.ConvertTypedObjectFrom(serializationContext, instanc" +
        "e, \"");

        
        #line default
        #line hidden
        
        #line 233 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(propertySerializedAsInnerValue.Name));

        
        #line default
        #line hidden
        
        #line 233 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\",str");

        
        #line default
        #line hidden
        
        #line 233 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(propertySerializedAsInnerValue.Name));

        
        #line default
        #line hidden
        
        #line 233 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(", typeof(");

        
        #line default
        #line hidden
        
        #line 233 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(CodeGenerationUtilities.GetDomainTypeFullName(propertySerializedAsInnerValue)));

        
        #line default
        #line hidden
        
        #line 233 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("), ");

        
        #line default
        #line hidden
        
        #line 233 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(isReq));

        
        #line default
        #line hidden
        
        #line 233 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(") as ");

        
        #line default
        #line hidden
        
        #line 233 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(CodeGenerationUtilities.GetDomainTypeFullName(propertySerializedAsInnerValue)));

        
        #line default
        #line hidden
        
        #line 233 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(";\r\n\t\t\t\tinstance.");

        
        #line default
        #line hidden
        
        #line 234 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(propertySerializedAsInnerValue.Name));

        
        #line default
        #line hidden
        
        #line 234 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" = valueOf");

        
        #line default
        #line hidden
        
        #line 234 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(propertySerializedAsInnerValue.Name));

        
        #line default
        #line hidden
        
        #line 234 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(";\t\t\t\t\t\t\r\n\r\n");

        
        #line default
        #line hidden
        
        #line 236 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

			}

        
        #line default
        #line hidden
        
        #line 238 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(@"				// Read to the start of the first child element.
				DslModeling::SerializationUtilities.SkipToFirstChild(reader);
								
				// Read nested XML elements, they can be either properties serialized as XML elements, or child 
				// model elements.
				while (!serializationContext.Result.Failed && !reader.EOF && reader.NodeType == global::System.Xml.XmlNodeType.Element)
				{
					ReadElements(serializationContext, element, reader);
			
					if (!serializationContext.Result.Failed && !reader.EOF && reader.NodeType == global::System.Xml.XmlNodeType.Element)
					{
						// Encountered one unknown XML element, skip it and keep reading.
						");

        
        #line default
        #line hidden
        
        #line 251 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(this.MetaModel.Name));

        
        #line default
        #line hidden
        
        #line 251 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("SerializationBehaviorSerializationMessages.UnexpectedXmlElement(serializationCont" +
        "ext, reader, \"");

        
        #line default
        #line hidden
        
        #line 251 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 251 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\");\r\n\t\t\t\t\t\tDslModeling::SerializationUtilities.Skip(reader);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}" +
        "\r\n\t\t}\r\n\t\r\n\t\t// Advance the reader to the next element (open tag of the next sibl" +
        "ing, end tag of the parent, or EOF)\r\n\t\tDslModeling::SerializationUtilities.Skip(" +
        "reader);\r\n");

        
        #line default
        #line hidden
        
        #line 260 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

	}

        
        #line default
        #line hidden
        
        #line 262 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(@"	
	}
	
	/// <summary>
	/// This method deserializes all properties that are serialized as XML attributes.
	/// </summary>
	/// <remarks>
	/// Because this method only handles properties serialized as XML attributes, the passed-in reader shouldn't be moved inside this method.
	/// The caller will guarantee that the reader is positioned on the open XML tag of the current element being deserialized.
	/// </remarks>
	/// <param name=""serializationContext"">Serialization context.</param>
	/// <param name=""element"">In-memory ");

        
        #line default
        #line hidden
        
        #line 273 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 273 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(@" instance that will get the deserialized data.</param>
	/// <param name=""reader"">XmlReader to read serialized data from.</param>
	[global::System.Diagnostics.CodeAnalysis.SuppressMessage(""Microsoft.Maintainability"", ""CA1502:AvoidExcessiveComplexity"", Justification = ""Generated code."")]
	protected override void ReadPropertiesFromAttributes(DslModeling::SerializationContext serializationContext, DslModeling::ModelElement element, global::System.Xml.XmlReader reader)
	{
		");

        
        #line default
        #line hidden
        
        #line 278 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 278 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" instanceOf");

        
        #line default
        #line hidden
        
        #line 278 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 278 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" = element as ");

        
        #line default
        #line hidden
        
        #line 278 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 278 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(";\r\n");

        
        #line default
        #line hidden
        
        #line 279 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

		List<SerializedDomainProperty> propertiesToReadInThisClass = new List<SerializedDomainProperty>();
		if( Attributes != null )
		{
			foreach(SerializationAttributeElement attr in Attributes )
			{
				if( !(attr is SerializedDomainProperty ) )
					continue;
				
				SerializedDomainProperty sP = attr as SerializedDomainProperty;
				DomainProperty p = sP.DomainProperty;	
				

				if( p.Element.GetMetaModel() == this.MetaModel && p.Element == domainClass)
					propertiesToReadInThisClass.Add(sP);


        
        #line default
        #line hidden
        
        #line 295 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\tif (!serializationContext.Result.Failed)\r\n\t\t{\r\n\t\t\tReadPropertyAsAttribute");

        
        #line default
        #line hidden
        
        #line 298 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(p.Name));

        
        #line default
        #line hidden
        
        #line 298 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("(serializationContext, instanceOf");

        
        #line default
        #line hidden
        
        #line 298 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 298 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(", reader);\r\n\t\t}\r\n");

        
        #line default
        #line hidden
        
        #line 300 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

				

			}
		}

        
        #line default
        #line hidden
        
        #line 305 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t}\r\n\t\r\n");

        
        #line default
        #line hidden
        
        #line 308 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

			foreach(SerializedDomainProperty sP in propertiesToReadInThisClass)
			{
				DomainProperty p = sP.DomainProperty;
				
				string isReq = "false";
				if( p.IsRequired )
					isReq = "true";
				
				if( sP.SerializationRepresentationType != SerializationRepresentationType.Attribute )
					continue;
				
				string modifier ="";
				if( CodeGenerationUtilities.HasProperty(domainClass.BaseElement, p.Name))
					modifier = "new ";

        
        #line default
        #line hidden
        
        #line 323 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t/// <summary>\r\n\t/// Read property ");

        
        #line default
        #line hidden
        
        #line 325 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(p.Name));

        
        #line default
        #line hidden
        
        #line 325 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" that needed to be serialized as XML attribute.\r\n\t/// </summary>\r\n\t/// <param nam" +
        "e=\"serializationContext\">Serialization context.</param>\r\n\t/// <param name=\"insta" +
        "nce\">");

        
        #line default
        #line hidden
        
        #line 328 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 328 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" instance to be serialized.</param>\r\n\t/// <param name=\"reader\">XmlReader.</param>" +
        " \r\n\t[global::System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Maintain" +
        "ability\", \"CA1502:AvoidExcessiveComplexity\", Justification = \"Generated code.\")]" +
        "\r\n\tprotected ");

        
        #line default
        #line hidden
        
        #line 331 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(modifier));

        
        #line default
        #line hidden
        
        #line 331 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("virtual void ReadPropertyAsAttribute");

        
        #line default
        #line hidden
        
        #line 331 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(p.Name));

        
        #line default
        #line hidden
        
        #line 331 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("(DslModeling::SerializationContext serializationContext, ");

        
        #line default
        #line hidden
        
        #line 331 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 331 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" instance, global::System.Xml.XmlReader reader)\r\n\t{\r\n");

        
        #line default
        #line hidden
        
        #line 333 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

				if( sP.SerializationName == "" )
				{

        
        #line default
        #line hidden
        
        #line 336 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\tError because the SerializationName of SerializedDomainProperty (");

        
        #line default
        #line hidden
        
        #line 337 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(p.Name));

        
        #line default
        #line hidden
        
        #line 337 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(") is empty.\r\n");

        
        #line default
        #line hidden
        
        #line 338 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

				}
				else
				{

        
        #line default
        #line hidden
        
        #line 342 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t// ");

        
        #line default
        #line hidden
        
        #line 343 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(p.Name));

        
        #line default
        #line hidden
        
        #line 343 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\r\n\t\tif (!serializationContext.Result.Failed)\r\n\t\t{\r\n\t\t\tstring attribValue = ");

        
        #line default
        #line hidden
        
        #line 346 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(this.MetaModel.Name));

        
        #line default
        #line hidden
        
        #line 346 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("SerializationHelper.Instance.ReadAttribute(serializationContext, instance, reader" +
        ", \"");

        
        #line default
        #line hidden
        
        #line 346 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(sP.SerializationName));

        
        #line default
        #line hidden
        
        #line 346 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\");\r\n\t\t\tif( attribValue != null )\r\n\t\t\t\tinstance.");

        
        #line default
        #line hidden
        
        #line 348 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(p.Name));

        
        #line default
        #line hidden
        
        #line 348 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" = ");

        
        #line default
        #line hidden
        
        #line 348 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(p.Type.MetaModel.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 348 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("SerializationHelper.Instance.ConvertTypedObjectFrom(serializationContext, instanc" +
        "e, \"");

        
        #line default
        #line hidden
        
        #line 348 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(p.Name));

        
        #line default
        #line hidden
        
        #line 348 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\", attribValue, typeof(");

        
        #line default
        #line hidden
        
        #line 348 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(CodeGenerationUtilities.GetDomainTypeFullName(p)));

        
        #line default
        #line hidden
        
        #line 348 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("), ");

        
        #line default
        #line hidden
        
        #line 348 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(isReq));

        
        #line default
        #line hidden
        
        #line 348 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(") as ");

        
        #line default
        #line hidden
        
        #line 348 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(CodeGenerationUtilities.GetDomainTypeFullName(p)));

        
        #line default
        #line hidden
        
        #line 348 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(";\r\n\t\t}\r\n");

        
        #line default
        #line hidden
        
        #line 350 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
			
				}				

        
        #line default
        #line hidden
        
        #line 352 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t\t\t\r\n\t}\r\n");

        
        #line default
        #line hidden
        
        #line 354 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

			}

        
        #line default
        #line hidden
        
        #line 356 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(@"	
	
	/// <summary>
	/// This methods deserializes nested XML elements inside the passed-in element.
	/// </summary>
	/// <remarks>
	/// The caller will guarantee that the current element does have nested XML elements, and the call will position the 
	/// reader at the open tag of the first child XML element.
	/// This method will read as many child XML elements as it can. It returns under three circumstances:
	/// 1) When an unknown child XML element is encountered. In this case, this method will position the reader at the open 
	///    tag of the unknown element. This implies that if the first child XML element is unknown, this method should return 
	///    immediately and do nothing.
	/// 2) When all child XML elemnets are read. In this case, the reader will be positioned at the end tag of the parent element.
	/// 3) EOF.
	/// </remarks>
	/// <param name=""serializationContext"">Serialization context.</param>
	/// <param name=""element"">In-memory ");

        
        #line default
        #line hidden
        
        #line 372 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 372 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(@" instance that will get the deserialized data.</param>
	/// <param name=""reader"">XmlReader to read serialized data from.</param>
	protected override void ReadElements(DslModeling::SerializationContext serializationContext, DslModeling::ModelElement element, global::System.Xml.XmlReader reader)
	{
");

        
        #line default
        #line hidden
        
        #line 376 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

	if( Children != null)
		if( Children.Count >  0 )
		{

        
        #line default
        #line hidden
        
        #line 380 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t");

        
        #line default
        #line hidden
        
        #line 381 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 381 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" instance = element as ");

        
        #line default
        #line hidden
        
        #line 381 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 381 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(";\r\n\t\tglobal::System.Diagnostics.Debug.Assert(instance != null, \"Expecting an inst" +
        "ance of ");

        
        #line default
        #line hidden
        
        #line 382 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 382 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("!\");\r\n\r\n\t\twhile (!serializationContext.Result.Failed && !reader.EOF && reader.Nod" +
        "eType == global::System.Xml.XmlNodeType.Element)\r\n\t\t{\r\n\t\t\tif(! ReadElement(seria" +
        "lizationContext, instance, reader, reader.LocalName) )\r\n\t\t\t\treturn;\r\n\t\t}\r\n");

        
        #line default
        #line hidden
        
        #line 389 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

		}

        
        #line default
        #line hidden
        
        #line 391 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t}\r\n\t\r\n\t/// <summary>\r\n\t/// This methods deserializes nested XML elements inside " +
        "the passed-in element.\r\n\t/// </summary>\r\n\t/// <param name=\"serializationContext\"" +
        ">Serialization context.</param>\r\n\t/// <param name=\"instance\">In-memory ");

        
        #line default
        #line hidden
        
        #line 398 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 398 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(@" instance that will get the deserialized data.</param>
	/// <param name=""reader"">XmlReader to read serialized data from.</param>
	/// <param name=""readerLocalName"">Current local name the xml reader is positioned at.</param>	
	/// <returns>True if the element has been successfully deserialized. False otherwise.</returns>
	protected virtual bool ReadElement(DslModeling::SerializationContext serializationContext, ");

        
        #line default
        #line hidden
        
        #line 402 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 402 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" instance, global::System.Xml.XmlReader reader, string readerLocalName)\r\n\t{\r\n");

        
        #line default
        #line hidden
        
        #line 404 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

	int counter = 0;	
	List<SerializedEmbeddingRelationship> embRelationshipsToRead = new List<SerializedEmbeddingRelationship>();
	List<SerializedDomainClass> embRelationshipsTargetToRead = new List<SerializedDomainClass>();
	List<SerializedReferenceRelationship> refRelationshipsToRead = new List<SerializedReferenceRelationship>();
	List<SerializedDomainRole> refRelationshipsRoleToRead = new List<SerializedDomainRole>();
	List<AttributedDomainElement> createDerivedClassLookupFor = new List<AttributedDomainElement>();
	propertiesToReadInThisClass.Clear();
	foreach(SerializationElement child in Children )
	{
		if( child is SerializedDomainProperty )
		{
			SerializedDomainProperty sP = child as SerializedDomainProperty;
			DomainProperty p = sP.DomainProperty;
				
			if( sP.SerializationRepresentationType != SerializationRepresentationType.Element )
				continue;
				
			if( p.Element.GetMetaModel() == this.MetaModel && p.Element == domainClass)
				propertiesToReadInThisClass.Add(sP);

			if( sP.SerializationName == "" )
			{

        
        #line default
        #line hidden
        
        #line 427 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\tError because the SerializationName of SerializedDomainProperty (");

        
        #line default
        #line hidden
        
        #line 428 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(p.Name));

        
        #line default
        #line hidden
        
        #line 428 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(") is empty.\r\n");

        
        #line default
        #line hidden
        
        #line 429 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

			}
			else
			{			

        
        #line default
        #line hidden
        
        #line 433 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\tif( readerLocalName == \"");

        
        #line default
        #line hidden
        
        #line 434 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(sP.SerializationName));

        
        #line default
        #line hidden
        
        #line 434 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\" )\r\n\t\t{\r\n\t\t\tReadPropertyAsElement");

        
        #line default
        #line hidden
        
        #line 436 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(p.Name));

        
        #line default
        #line hidden
        
        #line 436 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("(serializationContext, instance, reader);\r\n\t\t\treturn true;\r\n\t\t}\r\n");

        
        #line default
        #line hidden
        
        #line 439 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

			}				
		}
		else if( child is SerializedEmbeddingRelationship )
		{
			SerializedEmbeddingRelationship sCon = child as SerializedEmbeddingRelationship;
			EmbeddingRelationship con = sCon.EmbeddingRelationship;
			
			if( sCon.OmitRelationship )
				continue;
			
			if( con.GetMetaModel() == this.MetaModel && con.Source.RolePlayer == domainClass)
				embRelationshipsToRead.Add(sCon);

        
        #line default
        #line hidden
        
        #line 452 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\tif( ReadEmbeddingRelationship");

        
        #line default
        #line hidden
        
        #line 453 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Name));

        
        #line default
        #line hidden
        
        #line 453 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("(serializationContext, instance, reader, readerLocalName) )\r\n\t\t\treturn true;\r\n");

        
        #line default
        #line hidden
        
        #line 455 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

		}
		else if( child is SerializedReferenceRelationship && !(domainClass is EmbeddingRelationship))
		{
			SerializedReferenceRelationship sCon = child as SerializedReferenceRelationship;
			ReferenceRelationship con = sCon.ReferenceRelationship;
			
			if( sCon.OmitRelationship )
				continue;
			
			if( con.GetMetaModel() == this.MetaModel && con.Source.RolePlayer == domainClass)
				refRelationshipsToRead.Add(sCon);

        
        #line default
        #line hidden
        
        #line 467 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\tif( ReadReferenceRelationship");

        
        #line default
        #line hidden
        
        #line 468 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Name));

        
        #line default
        #line hidden
        
        #line 468 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("(serializationContext, instance, reader, readerLocalName) )\r\n\t\t\treturn true;\r\n");

        
        #line default
        #line hidden
        
        #line 470 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

		}
		else if( child is SerializedDomainClass && domainClass is EmbeddingRelationship )
		{
			SerializedDomainClass sDomainClass = child as SerializedDomainClass;
			DomainClass d = sDomainClass.DomainClass;
			EmbeddingRelationship con = domainClass as EmbeddingRelationship;
						
			if( d.GetMetaModel() == this.MetaModel )
			{
				embRelationshipsTargetToRead.Add(sDomainClass);

				if( !createDerivedClassLookupFor.Contains(d) )
					createDerivedClassLookupFor.Add(d );				
			}

        
        #line default
        #line hidden
        
        #line 485 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\tif( ReadEmbeddingRelationshipTarget");

        
        #line default
        #line hidden
        
        #line 486 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Name));

        
        #line default
        #line hidden
        
        #line 486 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(d.Name));

        
        #line default
        #line hidden
        
        #line 486 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("(serializationContext, instance, reader, readerLocalName) )\r\n\t\t\treturn true;\r\n");

        
        #line default
        #line hidden
        
        #line 488 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

		}
		else if( child is SerializedDomainRole && domainClass is ReferenceRelationship )
		{
			SerializedDomainRole dRole = child as SerializedDomainRole;
			ReferenceRelationship con = domainClass as ReferenceRelationship;
			
			if( dRole.DomainRole.RolePlayer.GetMetaModel() == this.MetaModel )
				refRelationshipsRoleToRead.Add(dRole);			

        
        #line default
        #line hidden
        
        #line 497 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\tif( ReadReferenceRelationshipRole");

        
        #line default
        #line hidden
        
        #line 498 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Name));

        
        #line default
        #line hidden
        
        #line 498 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(dRole.DomainRole.Name));

        
        #line default
        #line hidden
        
        #line 498 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("(serializationContext, instance, reader, readerLocalName) )\r\n\t\t\treturn true;\r\n");

        
        #line default
        #line hidden
        
        #line 500 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

		}
	}

        
        #line default
        #line hidden
        
        #line 503 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\r\n\t\treturn false;  // Don\'t know this element.\r\n\t}\r\n\t\r\n");

        
        #line default
        #line hidden
        
        #line 508 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

			foreach(SerializedDomainProperty sP in propertiesToReadInThisClass)
			{
				DomainProperty p = sP.DomainProperty;
				
				string isReq = "false";
				if( p.IsRequired )
					isReq = "true";
				
				if( sP.SerializationRepresentationType != SerializationRepresentationType.Element )
					continue;
				
				string modifier = "virtual";
				if( CodeGenerationUtilities.HasProperty(domainClass.BaseElement, p.Name))
					modifier = "override";

        
        #line default
        #line hidden
        
        #line 523 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t/// <summary>\r\n\t/// Write property ");

        
        #line default
        #line hidden
        
        #line 525 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(p.Name));

        
        #line default
        #line hidden
        
        #line 525 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" that need to be serialized as XML element.\r\n\t/// </summary>\r\n\t/// <param name=\"s" +
        "erializationContext\">Serialization context.</param>\r\n\t/// <param name=\"instance\"" +
        ">");

        
        #line default
        #line hidden
        
        #line 528 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 528 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(@" instance to be serialized.</param>
	/// <param name=""reader"">XmlWriter to write serialized data to.</param> 
	[global::System.Diagnostics.CodeAnalysis.SuppressMessage(""Microsoft.Maintainability"", ""CA1502:AvoidExcessiveComplexity"", Justification = ""Generated code."")]
	protected ");

        
        #line default
        #line hidden
        
        #line 531 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(modifier));

        
        #line default
        #line hidden
        
        #line 531 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" void ReadPropertyAsElement");

        
        #line default
        #line hidden
        
        #line 531 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(p.Name));

        
        #line default
        #line hidden
        
        #line 531 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("(DslModeling::SerializationContext serializationContext, ");

        
        #line default
        #line hidden
        
        #line 531 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 531 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" instance, global::System.Xml.XmlReader reader)\r\n\t{\r\n\t\tif (reader.IsEmptyElement)" +
        "\r\n\t\t{\t// No serialized value, must be default one.\r\n\t\t\tDslModeling::Serializatio" +
        "nUtilities.Skip(reader);  // Skip this tag.\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n");

        
        #line default
        #line hidden
        
        #line 539 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

				if( p.Type.SerializationStyle == SerializationStyle.CDATA )					
				{

        
        #line default
        #line hidden
        
        #line 542 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t\tstring str");

        
        #line default
        #line hidden
        
        #line 543 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(p.Name));

        
        #line default
        #line hidden
        
        #line 543 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" = ");

        
        #line default
        #line hidden
        
        #line 543 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(this.MetaModel.Name));

        
        #line default
        #line hidden
        
        #line 543 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("SerializationHelper.Instance.ReadElementCDATAContentAsString(serializationContext" +
        ", instance, reader);\r\n");

        
        #line default
        #line hidden
        
        #line 544 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

				}
				else
				{

        
        #line default
        #line hidden
        
        #line 548 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t\tstring str");

        
        #line default
        #line hidden
        
        #line 549 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(p.Name));

        
        #line default
        #line hidden
        
        #line 549 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" = ");

        
        #line default
        #line hidden
        
        #line 549 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(this.MetaModel.Name));

        
        #line default
        #line hidden
        
        #line 549 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("SerializationHelper.Instance.ReadElementContentAsString(serializationContext, ins" +
        "tance, reader);\r\n");

        
        #line default
        #line hidden
        
        #line 550 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

				}

        
        #line default
        #line hidden
        
        #line 552 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t\t\t\t\t\r\n\t\t\t");

        
        #line default
        #line hidden
        
        #line 554 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(CodeGenerationUtilities.GetDomainTypeFullName(p)));

        
        #line default
        #line hidden
        
        #line 554 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" valueOf");

        
        #line default
        #line hidden
        
        #line 554 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(p.Name));

        
        #line default
        #line hidden
        
        #line 554 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" = ");

        
        #line default
        #line hidden
        
        #line 554 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(p.Type.MetaModel.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 554 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("SerializationHelper.Instance.ConvertTypedObjectFrom(serializationContext, instanc" +
        "e, \"");

        
        #line default
        #line hidden
        
        #line 554 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(p.Name));

        
        #line default
        #line hidden
        
        #line 554 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\", str");

        
        #line default
        #line hidden
        
        #line 554 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(p.Name));

        
        #line default
        #line hidden
        
        #line 554 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(", typeof(");

        
        #line default
        #line hidden
        
        #line 554 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(CodeGenerationUtilities.GetDomainTypeFullName(p)));

        
        #line default
        #line hidden
        
        #line 554 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("), ");

        
        #line default
        #line hidden
        
        #line 554 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(isReq));

        
        #line default
        #line hidden
        
        #line 554 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(") as ");

        
        #line default
        #line hidden
        
        #line 554 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(CodeGenerationUtilities.GetDomainTypeFullName(p)));

        
        #line default
        #line hidden
        
        #line 554 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(";\r\n\t\t\tinstance.");

        
        #line default
        #line hidden
        
        #line 555 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(p.Name));

        
        #line default
        #line hidden
        
        #line 555 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" = valueOf");

        
        #line default
        #line hidden
        
        #line 555 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(p.Name));

        
        #line default
        #line hidden
        
        #line 555 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(";\r\n\t\t\t//DslModeling::SerializationUtilities.SkipToNextElement(reader);\r\n\t\t\tDslMod" +
        "eling::SerializationUtilities.Skip(reader);\r\n\t\t}\r\n\t}\r\n");

        
        #line default
        #line hidden
        
        #line 560 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

			}
			
			foreach(SerializedEmbeddingRelationship sCon in embRelationshipsToRead)
			{
				EmbeddingRelationship con = sCon.EmbeddingRelationship;
				string modifier ="virtual";
				if( CodeGenerationUtilities.HasRelationship(domainClass.BaseElement, con.Name))
					modifier = "override";				

        
        #line default
        #line hidden
        
        #line 569 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t/// <summary>\r\n\t/// Read emb. rel ");

        
        #line default
        #line hidden
        
        #line 571 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Name));

        
        #line default
        #line hidden
        
        #line 571 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" that needed to be serialized as XML element.\r\n\t/// </summary>\r\n\t/// <param name=" +
        "\"serializationContext\">Serialization context.</param>\r\n\t/// <param name=\"instanc" +
        "e\">");

        
        #line default
        #line hidden
        
        #line 574 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 574 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(@" instance to be serialized.</param>
	/// <param name=""reader"">XmlWriter to write serialized data to.</param> 
	/// <param name=""readerLocalName"">Local name.</param>
	[global::System.Diagnostics.CodeAnalysis.SuppressMessage(""Microsoft.Maintainability"", ""CA1502:AvoidExcessiveComplexity"", Justification = ""Generated code."")]
	protected ");

        
        #line default
        #line hidden
        
        #line 578 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(modifier));

        
        #line default
        #line hidden
        
        #line 578 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" bool ReadEmbeddingRelationship");

        
        #line default
        #line hidden
        
        #line 578 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Name));

        
        #line default
        #line hidden
        
        #line 578 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("(DslModeling::SerializationContext serializationContext, ");

        
        #line default
        #line hidden
        
        #line 578 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 578 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" instance, global::System.Xml.XmlReader reader, string readerLocalName)\r\n\t{\r\n");

        
        #line default
        #line hidden
        
        #line 580 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

		if( sCon.IsTargetIncludedSubmodel )
		{
			DomainClass targetClass = con.Target.RolePlayer as DomainClass;

        
        #line default
        #line hidden
        
        #line 584 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(@"		if (reader.LocalName == ""include"")
        {
 			string attributeValue = reader.GetAttribute(""href"");
            if (attributeValue != null)
            {
				try 
				{
            	    // get parent's path
   	    			DslEditorModeling::IParentModelElement parent = instance.GetDomainModelServices().ElementParentProvider.GetParentModelElement(instance);
            		if (parent == null)
                		throw new System.ArgumentNullException(""Parent of element "" + instance.ToString() + "" can not be null"");
			
					string path = parent.DomainFilePath;
            		string vModellDirectory = new System.IO.FileInfo(path).DirectoryName;
					
            	    // get current's path
            	    string curPath = attributeValue;
            	    if( !curPath.Contains(System.IO.Path.VolumeSeparatorChar.ToString()))
            	    {
            	        curPath = vModellDirectory + System.IO.Path.DirectorySeparatorChar + curPath;
            	    }

            	    if (System.IO.File.Exists(curPath))
            	    {
            	        // load VModell file
						");

        
        #line default
        #line hidden
        
        #line 610 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(targetClass.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 610 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" target = ");

        
        #line default
        #line hidden
        
        #line 610 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(targetClass.GetMetaModel().GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 610 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("SerializationHelper.Instance.LoadModel");

        
        #line default
        #line hidden
        
        #line 610 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(targetClass.Name));

        
        #line default
        #line hidden
        
        #line 610 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("(serializationContext.Result, instance.Store.DefaultPartition, curPath, null, nul" +
        "l, null);\r\n\t\t\t\t\t\tnew ");

        
        #line default
        #line hidden
        
        #line 611 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 611 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(@"(instance, target);
            	    }
            	    else
            	    {
            	        DslModeling::SerializationUtilities.AddMessage(serializationContext, DslModeling::SerializationMessageKind.Error,
            	            ""Could not include referenced Model: File not found"", reader as global::System.Xml.IXmlLineInfo);
            	    }
			
					DslModeling::SerializationUtilities.Skip(reader);
					return true;
				}
				catch {}
            }

            DslModeling::SerializationUtilities.Skip(reader);
		}
");

        
        #line default
        #line hidden
        
        #line 627 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

		}
		else
		{
			
				
			bool bSerializeInFullForm = con.NeedsFullSerialization() || sCon.IsInFullSerialization;
			if( !bSerializeInFullForm )
			{
				if( !createDerivedClassLookupFor.Contains(con.Target.RolePlayer) )
					createDerivedClassLookupFor.Add(con.Target.RolePlayer);

        
        #line default
        #line hidden
        
        #line 638 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\tSystem.Guid info;\r\n\t\tif( readerLocalName == \"");

        
        #line default
        #line hidden
        
        #line 640 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Target.RolePlayer.SerializationName));

        
        #line default
        #line hidden
        
        #line 640 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\" )\r\n\t\t{\r\n\t\t\tinfo = ");

        
        #line default
        #line hidden
        
        #line 642 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Target.RolePlayer.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 642 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".DomainClassId;\r\n\t\t}\r\n\t\telse // derived classes\r\n\t\t{\r\n\t\t\tinfo = DslEditorModeling" +
        "::SerializationHelper.TryGetFirstEmbeddedDerivedNameType(");

        
        #line default
        #line hidden
        
        #line 646 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 646 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".DomainClassId, ");

        
        #line default
        #line hidden
        
        #line 646 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Target.RolePlayer.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 646 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".DomainClassId, readerLocalName);\r\n\t\t}\r\n\t\tif( info != System.Guid.Empty )\r\n\t\t{\r\n\t" +
        "\t\tif (!serializationContext.Result.Failed)\r\n\t\t\t{\r\n\t\t\t\tDslModeling::DomainClassXm" +
        "lSerializer serializer");

        
        #line default
        #line hidden
        
        #line 652 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(counter));

        
        #line default
        #line hidden
        
        #line 652 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" = serializationContext.Directory.GetSerializer(info);\r\n\t\t\t\tglobal::System.Diagno" +
        "stics.Debug.Assert(serializer");

        
        #line default
        #line hidden
        
        #line 653 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(counter));

        
        #line default
        #line hidden
        
        #line 653 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" != null, \"Cannot find serializer for \" + info + \"!\");\r\n\t\t\t\t");

        
        #line default
        #line hidden
        
        #line 654 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Target.RolePlayer.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 654 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" child");

        
        #line default
        #line hidden
        
        #line 654 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(counter));

        
        #line default
        #line hidden
        
        #line 654 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" = serializer");

        
        #line default
        #line hidden
        
        #line 654 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(counter));

        
        #line default
        #line hidden
        
        #line 654 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".TryCreateInstance(serializationContext, reader, instance.Partition) as ");

        
        #line default
        #line hidden
        
        #line 654 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Target.RolePlayer.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 654 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(";\r\n\t\t\t\tif( child");

        
        #line default
        #line hidden
        
        #line 655 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(counter));

        
        #line default
        #line hidden
        
        #line 655 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" != null )\r\n\t\t\t\t{\r\n\t\t\t\t\tnew ");

        
        #line default
        #line hidden
        
        #line 657 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 657 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("(instance, child");

        
        #line default
        #line hidden
        
        #line 657 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(counter));

        
        #line default
        #line hidden
        
        #line 657 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(");\r\n\t\t\t\t\tserializer");

        
        #line default
        #line hidden
        
        #line 658 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(counter));

        
        #line default
        #line hidden
        
        #line 658 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".Read(serializationContext, child");

        
        #line default
        #line hidden
        
        #line 658 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(counter));

        
        #line default
        #line hidden
        
        #line 658 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(", reader);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\tDslModeling::SerializationUtilities.Skip(reader" +
        ");\r\n\t\t\t}\r\n\r\n\t\t\treturn true;\r\n\t\t}\r\n");

        
        #line default
        #line hidden
        
        #line 666 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

				//List<string> usedElements = new List<string>();
				//GenerateSaveEmbMethod(usedElements, con, con.Target.RolePlayer, ref counter);
			}
			else
			{

        
        #line default
        #line hidden
        
        #line 672 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\tif(readerLocalName == \"");

        
        #line default
        #line hidden
        
        #line 673 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(sCon.SerializationName));

        
        #line default
        #line hidden
        
        #line 673 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\" )\r\n\t\t{\r\n\t\t\tif (!serializationContext.Result.Failed)\r\n\t\t\t{\r\n\t\t\t\tDslModeling::Dom" +
        "ainClassXmlSerializer serializer");

        
        #line default
        #line hidden
        
        #line 677 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(counter));

        
        #line default
        #line hidden
        
        #line 677 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" = serializationContext.Directory.GetSerializer(");

        
        #line default
        #line hidden
        
        #line 677 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 677 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".DomainClassId);\r\n\t\t\t\tglobal::System.Diagnostics.Debug.Assert(serializer");

        
        #line default
        #line hidden
        
        #line 678 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(counter));

        
        #line default
        #line hidden
        
        #line 678 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" != null, \"Cannot find serializer for ");

        
        #line default
        #line hidden
        
        #line 678 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Name));

        
        #line default
        #line hidden
        
        #line 678 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("!\");\r\n\t\t\t\t");

        
        #line default
        #line hidden
        
        #line 679 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 679 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" connection");

        
        #line default
        #line hidden
        
        #line 679 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(counter));

        
        #line default
        #line hidden
        
        #line 679 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" = serializer");

        
        #line default
        #line hidden
        
        #line 679 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(counter));

        
        #line default
        #line hidden
        
        #line 679 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".TryCreateInstance(serializationContext, reader, instance.Partition) as ");

        
        #line default
        #line hidden
        
        #line 679 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 679 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(";\r\n\t\t\t\tif( connection");

        
        #line default
        #line hidden
        
        #line 680 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(counter));

        
        #line default
        #line hidden
        
        #line 680 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" != null )\r\n\t\t\t\t{\r\n\t\t\t\t\tconnection");

        
        #line default
        #line hidden
        
        #line 682 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(counter));

        
        #line default
        #line hidden
        
        #line 682 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".");

        
        #line default
        #line hidden
        
        #line 682 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Source.Name));

        
        #line default
        #line hidden
        
        #line 682 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" = instance;\r\n\t\t\t\t\tserializer");

        
        #line default
        #line hidden
        
        #line 683 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(counter));

        
        #line default
        #line hidden
        
        #line 683 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".Read(serializationContext, connection");

        
        #line default
        #line hidden
        
        #line 683 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(counter));

        
        #line default
        #line hidden
        
        #line 683 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(", reader);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif( connection");

        
        #line default
        #line hidden
        
        #line 685 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(counter));

        
        #line default
        #line hidden
        
        #line 685 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".");

        
        #line default
        #line hidden
        
        #line 685 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Source.Name));

        
        #line default
        #line hidden
        
        #line 685 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" == null ||\r\n\t\t\t\t\t\tconnection");

        
        #line default
        #line hidden
        
        #line 686 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(counter));

        
        #line default
        #line hidden
        
        #line 686 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".");

        
        #line default
        #line hidden
        
        #line 686 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Target.Name));

        
        #line default
        #line hidden
        
        #line 686 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" == null )\r\n\t\t\t\t\t\t");

        
        #line default
        #line hidden
        
        #line 687 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.GetMetaModel().Namespace));

        
        #line default
        #line hidden
        
        #line 687 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".");

        
        #line default
        #line hidden
        
        #line 687 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.GetMetaModel().Name));

        
        #line default
        #line hidden
        
        #line 687 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("SerializationPostProcessor.Instance.AddRelationshipTrackData(connection");

        
        #line default
        #line hidden
        
        #line 687 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(counter));

        
        #line default
        #line hidden
        
        #line 687 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".Id);\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\tDslModeling::SerializationUtilities.Skip(reader" +
        ");\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n");

        
        #line default
        #line hidden
        
        #line 694 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

			}
		}

        
        #line default
        #line hidden
        
        #line 697 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\r\n\t\treturn false;\r\n\t}\r\n");

        
        #line default
        #line hidden
        
        #line 701 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

			}
			
			foreach(SerializedReferenceRelationship sCon in refRelationshipsToRead)
			{
				ReferenceRelationship con = sCon.ReferenceRelationship;
				
				string modifier ="";
				if( CodeGenerationUtilities.HasRelationship(domainClass.BaseElement, con.Name))
					modifier = "new ";

        
        #line default
        #line hidden
        
        #line 711 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t/// <summary>\r\n\t/// Read ref. rel ");

        
        #line default
        #line hidden
        
        #line 713 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Name));

        
        #line default
        #line hidden
        
        #line 713 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" that needed to be serialized as XML element.\r\n\t/// </summary>\r\n\t/// <param name=" +
        "\"serializationContext\">Serialization context.</param>\r\n\t/// <param name=\"instanc" +
        "e\">");

        
        #line default
        #line hidden
        
        #line 716 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 716 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(@" instance to be serialized.</param>
	/// <param name=""readr"">XmlWriter to write serialized data to.</param> 
	/// <param name=""readerLocalName"">Local name.</param>
	[global::System.Diagnostics.CodeAnalysis.SuppressMessage(""Microsoft.Maintainability"", ""CA1502:AvoidExcessiveComplexity"", Justification = ""Generated code."")]
	protected ");

        
        #line default
        #line hidden
        
        #line 720 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(modifier));

        
        #line default
        #line hidden
        
        #line 720 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("virtual bool ReadReferenceRelationship");

        
        #line default
        #line hidden
        
        #line 720 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Name));

        
        #line default
        #line hidden
        
        #line 720 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("(DslModeling::SerializationContext serializationContext, ");

        
        #line default
        #line hidden
        
        #line 720 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 720 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" instance, global::System.Xml.XmlReader reader, string readerLocalName)\r\n\t{\r\n");

        
        #line default
        #line hidden
        
        #line 722 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

			bool bSerializeInFullForm = con.NeedsFullSerialization() || sCon.IsInFullSerialization;
			if( !bSerializeInFullForm )
			{

        
        #line default
        #line hidden
        
        #line 726 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\tif( readerLocalName == \"");

        
        #line default
        #line hidden
        
        #line 727 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.SerializationTargetName));

        
        #line default
        #line hidden
        
        #line 727 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\")\r\n\t\t{\r\n\t\t\tstring attribValue");

        
        #line default
        #line hidden
        
        #line 729 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Target.Name));

        
        #line default
        #line hidden
        
        #line 729 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(counter));

        
        #line default
        #line hidden
        
        #line 729 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" = ");

        
        #line default
        #line hidden
        
        #line 729 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(this.MetaModel.Name));

        
        #line default
        #line hidden
        
        #line 729 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("SerializationHelper.Instance.ReadAttribute(serializationContext, instance, reader" +
        ", \"");

        
        #line default
        #line hidden
        
        #line 729 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.SerializationAttributeName));

        
        #line default
        #line hidden
        
        #line 729 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\");\r\n\t\t\tif( attribValue");

        
        #line default
        #line hidden
        
        #line 730 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Target.Name));

        
        #line default
        #line hidden
        
        #line 730 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(counter));

        
        #line default
        #line hidden
        
        #line 730 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" != null )\r\n\t\t\t{\r\n\t\t\t\tSystem.Guid id = ");

        
        #line default
        #line hidden
        
        #line 732 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(this.MetaModel.Name));

        
        #line default
        #line hidden
        
        #line 732 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("SerializationHelper.Instance.ConvertIdFrom(serializationContext, attribValue");

        
        #line default
        #line hidden
        
        #line 732 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Target.Name));

        
        #line default
        #line hidden
        
        #line 732 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(counter));

        
        #line default
        #line hidden
        
        #line 732 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(");\r\n\t\t\t\tif( id != System.Guid.Empty)\r\n\t\t\t\t{\r\n\t\t\t\t\t");

        
        #line default
        #line hidden
        
        #line 735 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.GetMetaModel().Namespace));

        
        #line default
        #line hidden
        
        #line 735 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".");

        
        #line default
        #line hidden
        
        #line 735 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.GetMetaModel().Name));

        
        #line default
        #line hidden
        
        #line 735 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("SerializationPostProcessor.Instance.AddPostProcessData(\r\n\t\t\t\t\t\t");

        
        #line default
        #line hidden
        
        #line 736 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 736 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".DomainClassId, System.Guid.Empty, instance.Id, id);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tDslModeling" +
        "::SerializationUtilities.Skip(reader);\r\n\t\t\treturn true;\r\n\t\t}\r\n");

        
        #line default
        #line hidden
        
        #line 742 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

			}
			else
			{

        
        #line default
        #line hidden
        
        #line 746 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\tif( readerLocalName == \"");

        
        #line default
        #line hidden
        
        #line 747 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(sCon.SerializationName));

        
        #line default
        #line hidden
        
        #line 747 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\")\r\n\t\t{\r\n\t\t\tDslModeling::DomainClassXmlSerializer serializer");

        
        #line default
        #line hidden
        
        #line 749 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(counter));

        
        #line default
        #line hidden
        
        #line 749 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" = serializationContext.Directory.GetSerializer(");

        
        #line default
        #line hidden
        
        #line 749 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 749 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".DomainClassId);\r\n\t\t\tglobal::System.Diagnostics.Debug.Assert(serializer");

        
        #line default
        #line hidden
        
        #line 750 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(counter));

        
        #line default
        #line hidden
        
        #line 750 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" != null, \"Cannot find serializer for ");

        
        #line default
        #line hidden
        
        #line 750 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Name));

        
        #line default
        #line hidden
        
        #line 750 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("!\");\r\n\t\t\t");

        
        #line default
        #line hidden
        
        #line 751 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 751 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" connection");

        
        #line default
        #line hidden
        
        #line 751 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(counter));

        
        #line default
        #line hidden
        
        #line 751 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" = serializer");

        
        #line default
        #line hidden
        
        #line 751 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(counter));

        
        #line default
        #line hidden
        
        #line 751 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".TryCreateInstance(serializationContext, reader, instance.Partition) as ");

        
        #line default
        #line hidden
        
        #line 751 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 751 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(";\r\n\t\t\tif( connection");

        
        #line default
        #line hidden
        
        #line 752 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(counter));

        
        #line default
        #line hidden
        
        #line 752 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" != null )\r\n\t\t\t{\r\n\t\t\t\tconnection");

        
        #line default
        #line hidden
        
        #line 754 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(counter));

        
        #line default
        #line hidden
        
        #line 754 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".");

        
        #line default
        #line hidden
        
        #line 754 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Source.Name));

        
        #line default
        #line hidden
        
        #line 754 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" = instance;\r\n\t\t\t\tserializer");

        
        #line default
        #line hidden
        
        #line 755 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(counter));

        
        #line default
        #line hidden
        
        #line 755 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".Read(serializationContext, connection");

        
        #line default
        #line hidden
        
        #line 755 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(counter));

        
        #line default
        #line hidden
        
        #line 755 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(", reader);\r\n\t\t\t\t\r\n\t\t\t\tif( connection");

        
        #line default
        #line hidden
        
        #line 757 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(counter));

        
        #line default
        #line hidden
        
        #line 757 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".");

        
        #line default
        #line hidden
        
        #line 757 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Source.Name));

        
        #line default
        #line hidden
        
        #line 757 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" == null ||\r\n\t\t\t\t\tconnection");

        
        #line default
        #line hidden
        
        #line 758 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(counter));

        
        #line default
        #line hidden
        
        #line 758 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".");

        
        #line default
        #line hidden
        
        #line 758 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Target.Name));

        
        #line default
        #line hidden
        
        #line 758 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" == null )\r\n\t\t\t\t\t\t");

        
        #line default
        #line hidden
        
        #line 759 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.GetMetaModel().Namespace));

        
        #line default
        #line hidden
        
        #line 759 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".");

        
        #line default
        #line hidden
        
        #line 759 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.GetMetaModel().Name));

        
        #line default
        #line hidden
        
        #line 759 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("SerializationPostProcessor.Instance.AddRelationshipTrackData(connection");

        
        #line default
        #line hidden
        
        #line 759 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(counter));

        
        #line default
        #line hidden
        
        #line 759 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".Id);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tDslModeling::SerializationUtilities.Skip(reader);\r\n\t\t\tr" +
        "eturn true;\r\n\t\t}\r\n");

        
        #line default
        #line hidden
        
        #line 765 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

			}

        
        #line default
        #line hidden
        
        #line 767 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\r\n\t\treturn false;\r\n\t}\r\n");

        
        #line default
        #line hidden
        
        #line 771 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

			}
			
			foreach(SerializedDomainClass dS in embRelationshipsTargetToRead)
			{
				EmbeddingRelationship con = domainClass as EmbeddingRelationship;
				DomainClass d = dS.DomainClass;

        
        #line default
        #line hidden
        
        #line 778 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t/// <summary>\r\n\t/// Read emb. rel ");

        
        #line default
        #line hidden
        
        #line 780 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Name));

        
        #line default
        #line hidden
        
        #line 780 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" target ");

        
        #line default
        #line hidden
        
        #line 780 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(d.Name));

        
        #line default
        #line hidden
        
        #line 780 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" that needed to be serialized as XML element.\r\n\t/// </summary>\r\n\t/// <param name=" +
        "\"serializationContext\">Serialization context.</param>\r\n\t/// <param name=\"instanc" +
        "e\">");

        
        #line default
        #line hidden
        
        #line 783 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 783 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(@" instance to be serialized.</param>
	/// <param name=""reader"">XmlWriter to write serialized data to.</param> 
	/// <param name=""readerLocalName"">Local name.</param>
	[global::System.Diagnostics.CodeAnalysis.SuppressMessage(""Microsoft.Maintainability"", ""CA1502:AvoidExcessiveComplexity"", Justification = ""Generated code."")]
	protected virtual bool ReadEmbeddingRelationshipTarget");

        
        #line default
        #line hidden
        
        #line 787 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Name));

        
        #line default
        #line hidden
        
        #line 787 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(d.Name));

        
        #line default
        #line hidden
        
        #line 787 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("(DslModeling::SerializationContext serializationContext, ");

        
        #line default
        #line hidden
        
        #line 787 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 787 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" instance, global::System.Xml.XmlReader reader, string readerLocalName)\r\n\t{\r\n\t\tSy" +
        "stem.Guid info;\r\n\t\tif( readerLocalName == \"");

        
        #line default
        #line hidden
        
        #line 790 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Target.RolePlayer.SerializationName));

        
        #line default
        #line hidden
        
        #line 790 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\" )\r\n\t\t{\r\n\t\t\tinfo = ");

        
        #line default
        #line hidden
        
        #line 792 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Target.RolePlayer.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 792 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".DomainClassId;\r\n\t\t}\r\n\t\telse // derived classes\r\n\t\t{\r\n");

        
        #line default
        #line hidden
        
        #line 796 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

				if( domainClass is DomainRelationship )
				{

        
        #line default
        #line hidden
        
        #line 799 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t\tinfo = DslEditorModeling::SerializationHelper.TryGetFirstEmbeddedDerivedNameTy" +
        "pe(");

        
        #line default
        #line hidden
        
        #line 800 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Source.RolePlayer.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 800 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".DomainClassId, ");

        
        #line default
        #line hidden
        
        #line 800 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Target.RolePlayer.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 800 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".DomainClassId, readerLocalName);\r\n");

        
        #line default
        #line hidden
        
        #line 801 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
					
				}
				else
				{

        
        #line default
        #line hidden
        
        #line 805 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t\tinfo = DslEditorModeling::SerializationHelper.TryGetFirstEmbeddedDerivedNameTy" +
        "pe(");

        
        #line default
        #line hidden
        
        #line 806 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 806 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".DomainClassId, ");

        
        #line default
        #line hidden
        
        #line 806 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Target.RolePlayer.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 806 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".DomainClassId, readerLocalName);\r\n");

        
        #line default
        #line hidden
        
        #line 807 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

				}

        
        #line default
        #line hidden
        
        #line 809 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t\t\r\n\t\t}\r\n\t\tif( info != null )\r\n\t\t{\r\n\t\t\tif (!serializationContext.Result.Failed)\r" +
        "\n\t\t\t{\r\n\t\t\t\tDslModeling::DomainClassXmlSerializer serializer");

        
        #line default
        #line hidden
        
        #line 815 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(counter));

        
        #line default
        #line hidden
        
        #line 815 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" = serializationContext.Directory.GetSerializer(info);\r\n\t\t\t\tglobal::System.Diagno" +
        "stics.Debug.Assert(serializer");

        
        #line default
        #line hidden
        
        #line 816 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(counter));

        
        #line default
        #line hidden
        
        #line 816 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" != null, \"Cannot find serializer for \" + info + \"!\");\r\n\t\t\t\t");

        
        #line default
        #line hidden
        
        #line 817 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Target.RolePlayer.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 817 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" child");

        
        #line default
        #line hidden
        
        #line 817 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(counter));

        
        #line default
        #line hidden
        
        #line 817 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" = serializer");

        
        #line default
        #line hidden
        
        #line 817 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(counter));

        
        #line default
        #line hidden
        
        #line 817 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".TryCreateInstance(serializationContext, reader, instance.Partition) as ");

        
        #line default
        #line hidden
        
        #line 817 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Target.RolePlayer.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 817 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(";\r\n\t\t\t\tif( child");

        
        #line default
        #line hidden
        
        #line 818 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(counter));

        
        #line default
        #line hidden
        
        #line 818 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" != null )\r\n\t\t\t\t{\r\n\t\t\t\t\tserializer");

        
        #line default
        #line hidden
        
        #line 820 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(counter));

        
        #line default
        #line hidden
        
        #line 820 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".Read(serializationContext, child");

        
        #line default
        #line hidden
        
        #line 820 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(counter));

        
        #line default
        #line hidden
        
        #line 820 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(", reader);\r\n\t\t\t\t\tinstance.");

        
        #line default
        #line hidden
        
        #line 821 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Target.Name));

        
        #line default
        #line hidden
        
        #line 821 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" = child");

        
        #line default
        #line hidden
        
        #line 821 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(counter));

        
        #line default
        #line hidden
        
        #line 821 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(";\t\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\tDslModeling::SerializationUtilities.Skip(reader);\r\n\t\t\t}" +
        "\r\n\r\n\t\t\treturn true;\r\n\t\t}\t\r\n");

        
        #line default
        #line hidden
        
        #line 829 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

//		List<string> usedElements2 = new List<string>();
//		GenerateSaveEmbMethodTarget(usedElements2, con, d, ref counter);				

        
        #line default
        #line hidden
        
        #line 832 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\treturn false;\r\n\t}\r\n");

        
        #line default
        #line hidden
        
        #line 835 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

			}
			
			foreach(SerializedDomainRole dRole in refRelationshipsRoleToRead)
			{
				DomainRole role = dRole.DomainRole;
				ReferenceRelationship con = domainClass as ReferenceRelationship;				
				
			
				bool bSource = true;
				string roleName = con.Source.Name;
				if( con.Target == dRole.DomainRole )
				{
					bSource = false;
					roleName = con.Target.Name;
				}				

        
        #line default
        #line hidden
        
        #line 851 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t/// <summary>\r\n\t/// Read ref. rel ");

        
        #line default
        #line hidden
        
        #line 853 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Name));

        
        #line default
        #line hidden
        
        #line 853 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" role ");

        
        #line default
        #line hidden
        
        #line 853 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(role.Name));

        
        #line default
        #line hidden
        
        #line 853 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" that needed to be serialized as XML element.\r\n\t/// </summary>\r\n\t/// <param name=" +
        "\"serializationContext\">Serialization context.</param>\r\n\t/// <param name=\"instanc" +
        "e\">");

        
        #line default
        #line hidden
        
        #line 856 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 856 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(@" instance to be serialized.</param>
	/// <param name=""reader"">XmlWriter to write serialized data to.</param> 
	/// <param name=""readerLocalName"">Local name.</param>
	[global::System.Diagnostics.CodeAnalysis.SuppressMessage(""Microsoft.Maintainability"", ""CA1502:AvoidExcessiveComplexity"", Justification = ""Generated code."")]
	protected virtual bool ReadReferenceRelationshipRole");

        
        #line default
        #line hidden
        
        #line 860 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Name));

        
        #line default
        #line hidden
        
        #line 860 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(role.Name));

        
        #line default
        #line hidden
        
        #line 860 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("(DslModeling::SerializationContext serializationContext, ");

        
        #line default
        #line hidden
        
        #line 860 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 860 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" instance, global::System.Xml.XmlReader reader, string readerLocalName)\r\n\t{\r\n\t\tif" +
        "( readerLocalName ==  \"");

        
        #line default
        #line hidden
        
        #line 862 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(dRole.SerializationName));

        
        #line default
        #line hidden
        
        #line 862 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\")\r\n\t\t{\r\n\t\t\tstring attribValue");

        
        #line default
        #line hidden
        
        #line 864 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(roleName));

        
        #line default
        #line hidden
        
        #line 864 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" = ");

        
        #line default
        #line hidden
        
        #line 864 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(this.MetaModel.Name));

        
        #line default
        #line hidden
        
        #line 864 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("SerializationHelper.Instance.ReadAttribute(serializationContext, instance, reader" +
        ", \"");

        
        #line default
        #line hidden
        
        #line 864 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(dRole.SerializationAttributeName));

        
        #line default
        #line hidden
        
        #line 864 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\");\r\n\t\t\tif( attribValue");

        
        #line default
        #line hidden
        
        #line 865 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(roleName));

        
        #line default
        #line hidden
        
        #line 865 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" != null )\r\n\t\t\t{\r\n\t\t\t\tSystem.Guid id = ");

        
        #line default
        #line hidden
        
        #line 867 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(this.MetaModel.Name));

        
        #line default
        #line hidden
        
        #line 867 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("SerializationHelper.Instance.ConvertIdFrom(serializationContext, attribValue");

        
        #line default
        #line hidden
        
        #line 867 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(roleName));

        
        #line default
        #line hidden
        
        #line 867 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(");\r\n\t\t\t\tif( id != System.Guid.Empty)\r\n\t\t\t\t{\r\n");

        
        #line default
        #line hidden
        
        #line 870 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

			if( bSource )
			{

        
        #line default
        #line hidden
        
        #line 873 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t\t\t\t");

        
        #line default
        #line hidden
        
        #line 874 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.GetMetaModel().Namespace));

        
        #line default
        #line hidden
        
        #line 874 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".");

        
        #line default
        #line hidden
        
        #line 874 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.GetMetaModel().Name));

        
        #line default
        #line hidden
        
        #line 874 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("SerializationPostProcessor.Instance.AddPostProcessData(\r\n\t\t\t\t\t\t");

        
        #line default
        #line hidden
        
        #line 875 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 875 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".DomainClassId, instance.Id, id, System.Guid.Empty);\r\n\t\t\t\t\t");

        
        #line default
        #line hidden
        
        #line 876 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.GetMetaModel().Namespace));

        
        #line default
        #line hidden
        
        #line 876 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".");

        
        #line default
        #line hidden
        
        #line 876 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.GetMetaModel().Name));

        
        #line default
        #line hidden
        
        #line 876 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("SerializationPostProcessor.Instance.AddRelationshipTrackData(instance.Id);\r\n");

        
        #line default
        #line hidden
        
        #line 877 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

			}
			else
			{

        
        #line default
        #line hidden
        
        #line 881 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t\t\t\t");

        
        #line default
        #line hidden
        
        #line 882 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.GetMetaModel().Namespace));

        
        #line default
        #line hidden
        
        #line 882 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".");

        
        #line default
        #line hidden
        
        #line 882 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.GetMetaModel().Name));

        
        #line default
        #line hidden
        
        #line 882 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("SerializationPostProcessor.Instance.AddPostProcessData(\r\n\t\t\t\t\t\t");

        
        #line default
        #line hidden
        
        #line 883 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 883 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".DomainClassId, instance.Id, System.Guid.Empty, id);\r\n\t\t\t\t\t");

        
        #line default
        #line hidden
        
        #line 884 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.GetMetaModel().Namespace));

        
        #line default
        #line hidden
        
        #line 884 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".");

        
        #line default
        #line hidden
        
        #line 884 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.GetMetaModel().Name));

        
        #line default
        #line hidden
        
        #line 884 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("SerializationPostProcessor.Instance.AddRelationshipTrackData(instance.Id);\r\n");

        
        #line default
        #line hidden
        
        #line 885 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

			}

        
        #line default
        #line hidden
        
        #line 887 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tDslModeling::SerializationUtilities.Skip(reader);\r\n\t\t\treturn true" +
        ";\t\r\n\t\t}\r\n\t\t\t\r\n\t\treturn false;\r\n\t}\r\n");

        
        #line default
        #line hidden
        
        #line 896 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

			}
	bool privateHelper = false;

        
        #line default
        #line hidden
        
        #line 899 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\r\n\t#region TryCreateInstance");

        
        #line default
        #line hidden
        
        #line 901 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(isRelationship ? " & TryCreateDerivedInstance" : string.Empty));

        
        #line default
        #line hidden
        
        #line 901 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\r\n");

        
        #line default
        #line hidden
        
        #line 902 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

	//string serInhModifier = "";
	//if( domainClass.BaseElement != null && (domainClass is DomainClass))
	//	if( (domainClass as DomainClass).GetMetaModel() == this.MetaModel )
	//		serInhModifier = "new ";

        
        #line default
        #line hidden
        
        #line 907 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t/// <summary>\r\n\t/// This method creates a correct instance of ");

        
        #line default
        #line hidden
        
        #line 909 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 909 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" based on the tag currently pointed by the reader. If the reader\r\n\t/// is positio" +
        "ned at a serialized ");

        
        #line default
        #line hidden
        
        #line 910 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 910 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(", a new ");

        
        #line default
        #line hidden
        
        #line 910 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 910 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(@" instance will be created in the given partition, otherwise 
	/// null is returned.
	/// </summary>
	/// <remarks>
	/// The caller will guarantee that the reader is positioned at open XML tag of the next element being read. This method should
	/// not move the reader; the reader should remain at the same position when this method returns.
	/// </remarks>
	/// <param name=""serializationContext"">Serialization context.</param>
	/// <param name=""reader"">XmlReader to read serialized data from.</param>
	/// <param name=""partition"">Partition in which new elements should be created.</param>	
	/// <returns>Created ");

        
        #line default
        #line hidden
        
        #line 920 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 920 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" instance, or null if the reader is not pointing to a serialized ");

        
        #line default
        #line hidden
        
        #line 920 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 920 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(@" instance.</returns>
	public override DslModeling::ModelElement TryCreateInstance(DslModeling::SerializationContext serializationContext, global::System.Xml.XmlReader reader, DslModeling::Partition partition)
	{
		#region Check Parameters
		global::System.Diagnostics.Debug.Assert (serializationContext != null);
		if (serializationContext == null)
			throw new global::System.ArgumentNullException (""serializationContext"");
		global::System.Diagnostics.Debug.Assert (reader != null);
		if (reader == null)
			throw new global::System.ArgumentNullException (""reader"");
		global::System.Diagnostics.Debug.Assert (partition != null);
		if (partition == null)
			throw new global::System.ArgumentNullException (""partition"");
		#endregion

");

        
        #line default
        #line hidden
        
        #line 935 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

		if (isRelationship && !isSealed && !isAbstract)
		{	// For a non-abstract non-sealed relationship, the implementation of TryCreateDerivedInstance() is almost the same as 
			// TryCreateInstance(). So we generate the actual implementation into a private helper method to re-use
			// some code.
			privateHelper = true;

        
        #line default
        #line hidden
        
        #line 941 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\treturn this.InternalTryCreateInstance(serializationContext, reader, partition, " +
        "false /* include the type itself */);\r\n\t}\r\n\r\n\t/// <summary>\r\n\t/// This method cr" +
        "eates a correct derived instance of ");

        
        #line default
        #line hidden
        
        #line 946 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 946 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" based on the tag currently pointed by the reader.\r\n\t/// Note that the difference" +
        " between this method and the above one is that this method will never create an " +
        "instance of the\r\n\t/// ");

        
        #line default
        #line hidden
        
        #line 948 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 948 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(@" type itself, only derived types are checked.
	/// </summary>
	/// <remarks>
	/// The caller will guarantee that the reader is positioned at open XML tag of the next element being read. This method should
	/// not move the reader; the reader should remain at the same position when this method returns.
	/// </remarks>		
	/// <param name=""serializationContext"">Serialization context.</param>
	/// <param name=""reader"">XmlReader to read serialized data from.</param>
	/// <param name=""partition"">Partition in which new elements should be created.</param>
	/// <returns>Created instance that derives from ");

        
        #line default
        #line hidden
        
        #line 957 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 957 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(", or null if the reader is not pointing to such a serialized instance.</returns>\r" +
        "\n\tpublic override DslModeling::ElementLink TryCreateDerivedInstance (DslModeling" +
        "::SerializationContext serializationContext, global::System.Xml.XmlReader reader" +
        ", DslModeling::Partition partition)\r\n\t{\r\n\t\t#region Check Parameters\r\n\t\tglobal::S" +
        "ystem.Diagnostics.Debug.Assert (serializationContext != null);\r\n\t\tif (serializat" +
        "ionContext == null)\r\n\t\t\tthrow new global::System.ArgumentNullException (\"seriali" +
        "zationContext\");\r\n\t\tglobal::System.Diagnostics.Debug.Assert (reader != null);\r\n\t" +
        "\tif (reader == null)\r\n\t\t\tthrow new global::System.ArgumentNullException (\"reader" +
        "\");\r\n\t\tglobal::System.Diagnostics.Debug.Assert (partition != null);\r\n\t\tif (parti" +
        "tion == null)\r\n\t\t\tthrow new global::System.ArgumentNullException (\"partition\");\r" +
        "\n\t\t#endregion\r\n\r\n\t\treturn this.InternalTryCreateInstance(serializationContext, r" +
        "eader, partition, true /* derived types only */) as DslModeling::ElementLink;\r\n\t" +
        "}\r\n\r\n\t/// <summary>\r\n\t/// Internal helper method for TryCreateInstance() and Try" +
        "CreateDerivedInstance().\r\n\t/// </summary>\r\n\t/// <param name=\"serializationContex" +
        "t\">Serialization context.</param>\r\n\t/// <param name=\"reader\">XmlReader to read s" +
        "erialized data from.</param>\r\n\t/// <param name=\"partition\">Partition in which ne" +
        "w elements should be created.</param>\r\n\t/// <param name=\"derivedTypesOnly\">If tr" +
        "ue, this method will only check derived types, but not the domain class iitself." +
        "</param>\r\n\tprivate DslModeling::ModelElement InternalTryCreateInstance (DslModel" +
        "ing::SerializationContext serializationContext, global::System.Xml.XmlReader rea" +
        "der, DslModeling::Partition partition, bool derivedTypesOnly)\r\n\t{\r\n");

        
        #line default
        #line hidden
        
        #line 984 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

		}

        
        #line default
        #line hidden
        
        #line 986 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\tDslModeling::ModelElement result = null;\r\n\t\tif (!serializationContext.Result.Fa" +
        "iled && !reader.EOF && reader.NodeType == global::System.Xml.XmlNodeType.Element" +
        ")\r\n\t\t{\r\n\t\t\tstring localName = reader.LocalName;\r\n");

        
        #line default
        #line hidden
        
        #line 991 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

		if (!isAbstract)
		{

        
        #line default
        #line hidden
        
        #line 994 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t\tif (");

        
        #line default
        #line hidden
        
        #line 995 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(privateHelper ? "!derivedTypesOnly && " : string.Empty));

        
        #line default
        #line hidden
        
        #line 995 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("string.Compare (localName, this.XmlTagName, global::System.StringComparison.Curre" +
        "ntCulture) == 0)\r\n\t\t\t{\t// New \"");

        
        #line default
        #line hidden
        
        #line 996 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 996 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\" instance.\r\n\t\t\t\tresult = this.CreateInstance(serializationContext, reader, parti" +
        "tion);\r\n\t\t\t}\r\n");

        
        #line default
        #line hidden
        
        #line 999 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

			if (!isSealed)
			{

        
        #line default
        #line hidden
        
        #line 1002 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t\telse\r\n\t\t\t{\t// Check for derived classes of \"");

        
        #line default
        #line hidden
        
        #line 1004 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 1004 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\".\r\n\t\t\t\t//if (derivedClasses == null)\r\n\t\t\t\t//\tConstructDerivedClassesLookupTable");

        
        #line default
        #line hidden
        
        #line 1006 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 1006 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(@"(serializationContext.Directory, partition.DomainDataDirectory);
				//global::System.Diagnostics.Debug.Assert (derivedClasses != null);
				//DslModeling::DomainClassInfo derivedClass = null;
				System.Guid derivedType = DslEditorModeling::SerializationHelper.TryGetDerivedNameType(");

        
        #line default
        #line hidden
        
        #line 1009 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 1009 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".DomainClassId, localName);\r\n\t\t\t\tif( derivedType != System.Guid.Empty )\r\n\t\t\t\t//if" +
        " (derivedClasses.TryGetValue (localName, out derivedClass) && derivedClass != nu" +
        "ll)\r\n\t\t\t\t{\t// New derived ");

        
        #line default
        #line hidden
        
        #line 1012 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(isRelationship ? "relationship" : "class"));

        
        #line default
        #line hidden
        
        #line 1012 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" instance.\r\n\t\t\t\t\t//");

        
        #line default
        #line hidden
        
        #line 1013 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(serializerGenerationClassName));

        
        #line default
        #line hidden
        
        #line 1013 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" derivedSerializer = serializationContext.Directory.GetSerializer(derivedClass.Id" +
        ") as ");

        
        #line default
        #line hidden
        
        #line 1013 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(serializerGenerationClassName));

        
        #line default
        #line hidden
        
        #line 1013 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(";\r\n\t\t\t\t\t");

        
        #line default
        #line hidden
        
        #line 1014 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(serializerGenerationClassName));

        
        #line default
        #line hidden
        
        #line 1014 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" derivedSerializer = serializationContext.Directory.GetSerializer(derivedType) as" +
        " ");

        
        #line default
        #line hidden
        
        #line 1014 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(serializerGenerationClassName));

        
        #line default
        #line hidden
        
        #line 1014 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(";\r\n\t\t\t\t\tglobal::System.Diagnostics.Debug.Assert(derivedSerializer != null, \"Canno" +
        "t find serializer for \" + derivedType + \"!\");\r\n\t\t\t\t\tresult = derivedSerializer.C" +
        "reateInstance(serializationContext, reader, partition);\r\n\t\t\t\t}\r\n\t\t\t}\r\n");

        
        #line default
        #line hidden
        
        #line 1019 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

			}
		}
		else
		{

        
        #line default
        #line hidden
        
        #line 1024 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t\t// Check for derived classes of \"");

        
        #line default
        #line hidden
        
        #line 1025 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 1025 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\".\r\n\t\t\t//if (derivedClasses == null)\r\n\t\t\t//\tConstructDerivedClassesLookupTable");

        
        #line default
        #line hidden
        
        #line 1027 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 1027 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(@"(serializationContext.Directory, partition.DomainDataDirectory);
			//global::System.Diagnostics.Debug.Assert (derivedClasses != null);
			//DslModeling::DomainClassInfo derivedClass = null;
			System.Guid derivedType = DslEditorModeling::SerializationHelper.TryGetDerivedNameType(");

        
        #line default
        #line hidden
        
        #line 1030 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 1030 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".DomainClassId, localName);\r\n\t\t\tif( derivedType != System.Guid.Empty )\r\n\t\t\t//if (" +
        "derivedClasses.TryGetValue (localName, out derivedClass) && derivedClass != null" +
        ")\r\n\t\t\t{\t// New derived ");

        
        #line default
        #line hidden
        
        #line 1033 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(isRelationship ? "relationship" : "class"));

        
        #line default
        #line hidden
        
        #line 1033 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" instance.\r\n\t\t\t\t//");

        
        #line default
        #line hidden
        
        #line 1034 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(serializerGenerationClassName));

        
        #line default
        #line hidden
        
        #line 1034 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" derivedSerializer = serializationContext.Directory.GetSerializer(derivedClass.Id" +
        ") as ");

        
        #line default
        #line hidden
        
        #line 1034 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(serializerGenerationClassName));

        
        #line default
        #line hidden
        
        #line 1034 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(";\r\n\t\t\t\t");

        
        #line default
        #line hidden
        
        #line 1035 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(serializerGenerationClassName));

        
        #line default
        #line hidden
        
        #line 1035 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" derivedSerializer = serializationContext.Directory.GetSerializer(derivedType) as" +
        " ");

        
        #line default
        #line hidden
        
        #line 1035 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(serializerGenerationClassName));

        
        #line default
        #line hidden
        
        #line 1035 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(";\r\n\t\t\t\tglobal::System.Diagnostics.Debug.Assert(derivedSerializer != null, \"Cannot" +
        " find serializer for \" + derivedType + \"!\");\r\n\t\t\t\tresult = derivedSerializer.Cre" +
        "ateInstance(serializationContext, reader, partition);\r\n\t\t\t}\r\n");

        
        #line default
        #line hidden
        
        #line 1039 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

		}

        
        #line default
        #line hidden
        
        #line 1041 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\t/// <summary>\r\n\t/// This method creates an instan" +
        "ce of ");

        
        #line default
        #line hidden
        
        #line 1048 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 1048 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" based on the tag currently pointed by the reader. The reader is guaranteed (by t" +
        "he caller)\r\n\t/// to be pointed at a serialized instance of ");

        
        #line default
        #line hidden
        
        #line 1049 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 1049 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(@".
	/// </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 ");

        
        #line default
        #line hidden
        
        #line 1057 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 1057 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" instance should be created.</param>\t\r\n\t/// <returns>Created ");

        
        #line default
        #line hidden
        
        #line 1058 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 1058 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" instance.</returns>\r\n\tprotected override DslModeling::ModelElement CreateInstanc" +
        "e(DslModeling::SerializationContext serializationContext, global::System.Xml.Xml" +
        "Reader reader, DslModeling::Partition partition)\r\n\t{\r\n");

        
        #line default
        #line hidden
        
        #line 1061 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

		if (isAbstract)
		{

        
        #line default
        #line hidden
        
        #line 1064 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t// Abstract class, cannot be serialized.\r\n\t\tthrow new global::System.NotSupport" +
        "edException();\r\n");

        
        #line default
        #line hidden
        
        #line 1067 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

		}
		else
		{

        
        #line default
        #line hidden
        
        #line 1071 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\tstring idStr = reader.GetAttribute (");

        
        #line default
        #line hidden
        
        #line 1072 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(this.MetaModel.Name));

        
        #line default
        #line hidden
        
        #line 1072 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("SerializationBehavior.Instance.IdSerializationName");

        
        #line default
        #line hidden
        
        #line 1072 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.ParentModelContext.Name));

        
        #line default
        #line hidden
        
        #line 1072 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(");\r\n\t\ttry\r\n\t\t{\r\n\t\t\tglobal::System.Guid id;\r\n\t\t\tif (string.IsNullOrEmpty(idStr))\r\n" +
        "\t\t\t{\t// Create a default Id.\r\n\t\t\t\tid = ");

        
        #line default
        #line hidden
        
        #line 1078 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(this.MetaModel.Name));

        
        #line default
        #line hidden
        
        #line 1078 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("DomainModelIdProvider.Instance.GenerateNewKey();\r\n");

        
        #line default
        #line hidden
        
        #line 1079 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

				if( !bOmitIdProperty )
				{

        
        #line default
        #line hidden
        
        #line 1082 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t\t\tDslModeling::SerializationUtilities.AddMessage(serializationContext,DslModeli" +
        "ng::SerializationMessageKind.Warning,\r\n\t\t\t\t\t\"Missing \'Id\' attribute, a new Guid " +
        "\" + id.ToString() + \" is auto-generated. Element type (");

        
        #line default
        #line hidden
        
        #line 1084 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 1084 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(")\",\r\n\t    \t\t\treader as global::System.Xml.IXmlLineInfo);\r\n\t\t\t\t//");

        
        #line default
        #line hidden
        
        #line 1086 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(this.MetaModel.Name));

        
        #line default
        #line hidden
        
        #line 1086 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("SerializationBehaviorSerializationMessages.MissingId(serializationContext, reader" +
        ", id);\r\n");

        
        #line default
        #line hidden
        
        #line 1087 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

				}

        
        #line default
        #line hidden
        
        #line 1089 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tid = ");

        
        #line default
        #line hidden
        
        #line 1093 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(this.MetaModel.Name));

        
        #line default
        #line hidden
        
        #line 1093 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("SerializationHelper.Instance.ConvertIdFrom(serializationContext, idStr);\r\n\t\t\t}\r\n");

        
        #line default
        #line hidden
        
        #line 1095 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

				if (!isRelationship)
				{

        
        #line default
        #line hidden
        
        #line 1098 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t\treturn new ");

        
        #line default
        #line hidden
        
        #line 1099 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(classTypeString));

        
        #line default
        #line hidden
        
        #line 1099 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("(partition, new DslModeling::PropertyAssignment(DslModeling::ElementFactory.IdPro" +
        "pertyAssignment, id));\r\n");

        
        #line default
        #line hidden
        
        #line 1100 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

				}
				else
				{
					DomainRole nonAnchorRole = (domainClass as DomainRelationship).Target;
					DomainRole anchorRole = nonAnchorRole.Opposite;

        
        #line default
        #line hidden
        
        #line 1106 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t\t\r\n\t\t\t// Create the link with place-holder role-players.\r\n\t\t\treturn new ");

        
        #line default
        #line hidden
        
        #line 1109 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(classTypeString));

        
        #line default
        #line hidden
        
        #line 1109 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("(\r\n\t\t\t\tpartition,\r\n\t\t\t\tnew DslModeling::RoleAssignment[] {\r\n\t\t\t\t\tDslModeling::Rol" +
        "eAssignment.CreatePlaceholderRoleAssignment (");

        
        #line default
        #line hidden
        
        #line 1112 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(classTypeString));

        
        #line default
        #line hidden
        
        #line 1112 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".");

        
        #line default
        #line hidden
        
        #line 1112 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(anchorRole.Name));

        
        #line default
        #line hidden
        
        #line 1112 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("DomainRoleId), \r\n\t\t\t\t\tDslModeling::RoleAssignment.CreatePlaceholderRoleAssignment" +
        " (");

        
        #line default
        #line hidden
        
        #line 1113 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(classTypeString));

        
        #line default
        #line hidden
        
        #line 1113 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".");

        
        #line default
        #line hidden
        
        #line 1113 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(nonAnchorRole.Name));

        
        #line default
        #line hidden
        
        #line 1113 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("DomainRoleId)\r\n\t\t\t\t},\r\n\t\t\t\tnew DslModeling::PropertyAssignment[] {\r\n\t\t\t\t\tnew DslM" +
        "odeling::PropertyAssignment(DslModeling::ElementFactory.IdPropertyAssignment, id" +
        ")\r\n\t\t\t\t}\r\n\t\t\t);\r\n");

        
        #line default
        #line hidden
        
        #line 1119 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

				}

        
        #line default
        #line hidden
        
        #line 1121 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t}\r\n\t\tcatch (global::System.ArgumentNullException /* anEx */)\r\n\t\t{\t\r\n\t\t\t");

        
        #line default
        #line hidden
        
        #line 1125 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(this.MetaModel.Name));

        
        #line default
        #line hidden
        
        #line 1125 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("SerializationBehaviorSerializationMessages.InvalidPropertyValue(serializationCont" +
        "ext, reader, \"Id\", typeof(global::System.Guid), idStr);\r\n\t\t}\r\n\t\tcatch (global::S" +
        "ystem.FormatException /* fEx */)\r\n\t\t{\r\n\t\t\t");

        
        #line default
        #line hidden
        
        #line 1129 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(this.MetaModel.Name));

        
        #line default
        #line hidden
        
        #line 1129 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("SerializationBehaviorSerializationMessages.InvalidPropertyValue(serializationCont" +
        "ext, reader, \"Id\", typeof(global::System.Guid), idStr);\r\n\t\t}\r\n\t\tcatch (global::S" +
        "ystem.OverflowException /* ofEx */)\r\n\t\t{\r\n\t\t\t");

        
        #line default
        #line hidden
        
        #line 1133 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(this.MetaModel.Name));

        
        #line default
        #line hidden
        
        #line 1133 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("SerializationBehaviorSerializationMessages.InvalidPropertyValue(serializationCont" +
        "ext, reader, \"Id\", typeof(global::System.Guid), idStr);\r\n\t\t}\r\n\t\treturn null;\r\n");

        
        #line default
        #line hidden
        
        #line 1136 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

			
		}

        
        #line default
        #line hidden
        
        #line 1139 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t}\r\n");

        
        #line default
        #line hidden
        
        #line 1141 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

		if (isRelationship && !privateHelper)
		{

        
        #line default
        #line hidden
        
        #line 1144 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\r\n\t/// <summary>\r\n\t/// This method creates a correct derived instance of ");

        
        #line default
        #line hidden
        
        #line 1147 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 1147 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" based on the tag currently pointed by the reader.\r\n\t/// Note that the difference" +
        " between this method and the above one is that this method will never create an " +
        "instance of the\r\n\t/// ");

        
        #line default
        #line hidden
        
        #line 1149 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 1149 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(@" type itself, only derived types are checked.
	/// </summary>
	/// <remarks>
	/// The caller will guarantee that the reader is positioned at open XML tag of the next element being read. This method should
	/// not move the reader; the reader should remain at the same position when this method returns.
	/// </remarks>		
	/// <param name=""serializationContext"">Serialization context.</param>
	/// <param name=""reader"">XmlReader to read serialized data from.</param>
	/// <param name=""partition"">Partition in which new elements should be created.</param>
	/// <returns>Created instance that derives from ");

        
        #line default
        #line hidden
        
        #line 1158 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 1158 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(@", or null if the reader is not pointing to such a serialized instance.</returns>
	public override DslModeling::ElementLink TryCreateDerivedInstance (DslModeling::SerializationContext serializationContext, global::System.Xml.XmlReader reader, DslModeling::Partition partition)
");

        
        #line default
        #line hidden
        
        #line 1160 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

			if (isAbstract)
			{	// For abstract relationship, TryCreateDerivedInstance() and TryCreateInstance() will be the same

        
        #line default
        #line hidden
        
        #line 1163 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t{\t// Abstract relationship, so it\'s the same as TryCreateInstance().\r\n\t\treturn t" +
        "his.TryCreateInstance(serializationContext, reader, partition) as DslModeling::E" +
        "lementLink;\r\n");

        
        #line default
        #line hidden
        
        #line 1166 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

			}
			else // Must be sealed.
			{	// Sealed relationship won't have derived instances.		

        
        #line default
        #line hidden
        
        #line 1170 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t{\t// Sealed relationship, won\'t have any derived instances.\r\n\t\treturn null;\r\n");

        
        #line default
        #line hidden
        
        #line 1173 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

			}

        
        #line default
        #line hidden
        
        #line 1175 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t}\r\n");

        
        #line default
        #line hidden
        
        #line 1177 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

		}

        
        #line default
        #line hidden
        
        #line 1179 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t#endregion\r\n\t#endregion\r\n\r\n\t#region Write\r\n\t/// <summary>\r\n\t/// Public Write() m" +
        "ethod that serializes one ");

        
        #line default
        #line hidden
        
        #line 1185 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 1185 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" instance into XML.\r\n\t/// </summary>\r\n\t/// <param name=\"serializationContext\">Ser" +
        "ialization context.</param>\r\n\t/// <param name=\"element\">");

        
        #line default
        #line hidden
        
        #line 1188 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 1188 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(@" instance to be serialized.</param>
	/// <param name=""writer"">XmlWriter to write serialized data to.</param>
	/// <param name=""rootElementSettings"">
	/// The root element settings if the passed in element is serialized as a root element in the XML. The root element contains additional
	/// information like schema target namespace, version, etc.
	/// This should only be passed for root-level elements. Null should be passed for rest elements (and ideally call the Write() method 
	/// without this parameter).
	/// </param>
	/// <param name=""options"">Serialization options.</param>
	public override void Write(DslModeling::SerializationContext serializationContext, DslModeling::ModelElement element, global::System.Xml.XmlWriter writer, DslModeling::RootElementSettings rootElementSettings, DslEditorModeling::SerializationOptions options)
	{
");

        
        #line default
        #line hidden
        
        #line 1199 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
 
	if( isAbstract )
	{

        
        #line default
        #line hidden
        
        #line 1202 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\tthrow new global::System.NotSupportedException();\r\n");

        
        #line default
        #line hidden
        
        #line 1204 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

	}
	else
	{

        
        #line default
        #line hidden
        
        #line 1208 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(@"		#region Check Parameters
		global::System.Diagnostics.Debug.Assert (serializationContext != null);
		if (serializationContext == null)
			throw new global::System.ArgumentNullException (""serializationContext"");
		global::System.Diagnostics.Debug.Assert (element != null);
		if (element == null)
			throw new global::System.ArgumentNullException (""element"");
		global::System.Diagnostics.Debug.Assert (writer != null);
		if (writer == null)
			throw new global::System.ArgumentNullException (""writer"");
		#endregion

		// Write start of element, including schema target namespace if specified.
		writer.WriteStartElement(this.XmlTagName);
		
");

        
        #line default
        #line hidden
        
        #line 1224 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

	if( domainClass is DomainClass )
		if( (domainClass as DomainClass).IsDomainModel)
		{

        
        #line default
        #line hidden
        
        #line 1228 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t\r\n\t\tif(rootElementSettings != null )\r\n\t\t\t");

        
        #line default
        #line hidden
        
        #line 1230 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(this.MetaModel.Name));

        
        #line default
        #line hidden
        
        #line 1230 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("SerializationHelper.Instance.WriteSchemaDefinitions(writer, \"");

        
        #line default
        #line hidden
        
        #line 1230 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture((domainClass as DomainClass).ModelContext.Name));

        
        #line default
        #line hidden
        
        #line 1230 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\", \"");

        
        #line default
        #line hidden
        
        #line 1230 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 1230 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\");\r\n\t\t\r\n");

        
        #line default
        #line hidden
        
        #line 1232 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

		}
		if( propertySerializedAsInnerValue != null )
		{
			string isReq = "false";
			if( propertySerializedAsInnerValue.IsRequired )
				isReq = "true";

        
        #line default
        #line hidden
        
        #line 1239 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t// Write inner value property\r\n\t\t");

        
        #line default
        #line hidden
        
        #line 1241 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 1241 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" instance = element as ");

        
        #line default
        #line hidden
        
        #line 1241 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 1241 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(";\t\r\n\t\tobject value");

        
        #line default
        #line hidden
        
        #line 1242 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(propertySerializedAsInnerValue.Name));

        
        #line default
        #line hidden
        
        #line 1242 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" = ");

        
        #line default
        #line hidden
        
        #line 1242 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(this.MetaModel.Name));

        
        #line default
        #line hidden
        
        #line 1242 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("SerializationHelper.Instance.ConvertTypedObjectTo(serializationContext,instance, " +
        "\"");

        
        #line default
        #line hidden
        
        #line 1242 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(propertySerializedAsInnerValue.Name));

        
        #line default
        #line hidden
        
        #line 1242 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\" , instance.");

        
        #line default
        #line hidden
        
        #line 1242 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(propertySerializedAsInnerValue.Name));

        
        #line default
        #line hidden
        
        #line 1242 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(", typeof(");

        
        #line default
        #line hidden
        
        #line 1242 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(CodeGenerationUtilities.GetDomainTypeFullName(propertySerializedAsInnerValue)));

        
        #line default
        #line hidden
        
        #line 1242 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("), ");

        
        #line default
        #line hidden
        
        #line 1242 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(isReq));

        
        #line default
        #line hidden
        
        #line 1242 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(");\t\t\r\n\t\tif( value");

        
        #line default
        #line hidden
        
        #line 1243 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(propertySerializedAsInnerValue.Name));

        
        #line default
        #line hidden
        
        #line 1243 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" != null )\r\n\t\t{\r\n");

        
        #line default
        #line hidden
        
        #line 1245 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

			if( propertySerializedAsInnerValue.Type.SerializationStyle == SerializationStyle.CDATA )					
			{

        
        #line default
        #line hidden
        
        #line 1248 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t");

        
        #line default
        #line hidden
        
        #line 1249 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(this.MetaModel.Name));

        
        #line default
        #line hidden
        
        #line 1249 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("SerializationHelper.Instance.WriteCDATAFromInnerXmlAsString(serializationContext," +
        " instance, writer, \"");

        
        #line default
        #line hidden
        
        #line 1249 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(propertySerializedAsInnerValue.Name));

        
        #line default
        #line hidden
        
        #line 1249 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\", value");

        
        #line default
        #line hidden
        
        #line 1249 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(propertySerializedAsInnerValue.Name));

        
        #line default
        #line hidden
        
        #line 1249 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".ToString());\r\n");

        
        #line default
        #line hidden
        
        #line 1250 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

			}
			else
			{

        
        #line default
        #line hidden
        
        #line 1254 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t");

        
        #line default
        #line hidden
        
        #line 1255 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(this.MetaModel.Name));

        
        #line default
        #line hidden
        
        #line 1255 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("SerializationHelper.Instance.WriteInnerXmlAsString(serializationContext, instance" +
        ", writer, \"");

        
        #line default
        #line hidden
        
        #line 1255 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(propertySerializedAsInnerValue.Name));

        
        #line default
        #line hidden
        
        #line 1255 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\", value");

        
        #line default
        #line hidden
        
        #line 1255 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(propertySerializedAsInnerValue.Name));

        
        #line default
        #line hidden
        
        #line 1255 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".ToString());\r\n");

        
        #line default
        #line hidden
        
        #line 1256 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

			}

        
        #line default
        #line hidden
        
        #line 1258 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t}\r\n");

        
        #line default
        #line hidden
        
        #line 1260 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

		}

        
        #line default
        #line hidden
        
        #line 1262 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(@"		if (!serializationContext.Result.Failed)
		{
			WritePropertiesAsAttributes(serializationContext, element, writer, options);
		}

		if (!serializationContext.Result.Failed)
		{
			// Write 1) properties serialized as nested XML elements and 2) child model elements into XML.
			WriteElements(serializationContext, element, writer, options);
		}
		writer.WriteEndElement();
");

        
        #line default
        #line hidden
        
        #line 1274 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

	}

        
        #line default
        #line hidden
        
        #line 1276 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t}\r\n\r\n\t/// <summary>\r\n\t/// Write all properties that need to be serialized as XML" +
        " attributes.\r\n\t/// </summary>\r\n\t/// <param name=\"serializationContext\">Serializa" +
        "tion context.</param>\r\n\t/// <param name=\"element\">");

        
        #line default
        #line hidden
        
        #line 1283 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 1283 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(@" instance to be serialized.</param>
	/// <param name=""writer"">XmlWriter to write serialized data to.</param> 
	/// <param name=""options"">Serialization options.</param>
	[global::System.Diagnostics.CodeAnalysis.SuppressMessage(""Microsoft.Maintainability"", ""CA1502:AvoidExcessiveComplexity"", Justification = ""Generated code."")]
	protected override void WritePropertiesAsAttributes(DslModeling::SerializationContext serializationContext, DslModeling::ModelElement element, global::System.Xml.XmlWriter writer, DslEditorModeling::SerializationOptions options)
	{
		");

        
        #line default
        #line hidden
        
        #line 1289 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 1289 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" instance = element as ");

        
        #line default
        #line hidden
        
        #line 1289 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 1289 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(";\r\n\t\tglobal::System.Diagnostics.Debug.Assert(instance != null, \"Expecting an inst" +
        "ance of ");

        
        #line default
        #line hidden
        
        #line 1290 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 1290 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\");\r\n\t\t\r\n");

        
        #line default
        #line hidden
        
        #line 1292 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

		List<SerializedDomainProperty> propertiesToWriteInThisClass = new List<SerializedDomainProperty>();
		if( Attributes != null )
			foreach(SerializationAttributeElement attr in Attributes)
			{
				if( attr is SerializedIdProperty)
				{
					if( !bOmitIdProperty )
					{

        
        #line default
        #line hidden
        
        #line 1301 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t// Domain Element Id\r\n\t\tstring valueId = ");

        
        #line default
        #line hidden
        
        #line 1303 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(this.MetaModel.Name));

        
        #line default
        #line hidden
        
        #line 1303 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("SerializationHelper.Instance.ConvertIdTo(serializationContext, element.Id);\r\n\t\twr" +
        "iter.WriteAttributeString(");

        
        #line default
        #line hidden
        
        #line 1304 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(this.MetaModel.Name+"SerializationBehavior"));

        
        #line default
        #line hidden
        
        #line 1304 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".Instance.IdSerializationName");

        
        #line default
        #line hidden
        
        #line 1304 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.ParentModelContext.Name));

        
        #line default
        #line hidden
        
        #line 1304 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(", valueId);\r\n\t\t\r\n");

        
        #line default
        #line hidden
        
        #line 1306 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
		
					}					
				}
				else if( attr is SerializedDomainProperty)
				{
					SerializedDomainProperty sP = attr as SerializedDomainProperty;
					DomainProperty p = sP.DomainProperty;
					
					if( sP.OmitProperty )
						continue;
					
					if( p.Element.GetMetaModel() == this.MetaModel && p.Element == domainClass)
						propertiesToWriteInThisClass.Add(sP);


        
        #line default
        #line hidden
        
        #line 1320 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\tif (!serializationContext.Result.Failed)\r\n\t\t{\r\n\t\t\tWritePropertyAsAttribute");

        
        #line default
        #line hidden
        
        #line 1323 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(p.Name));

        
        #line default
        #line hidden
        
        #line 1323 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("(serializationContext, instance, writer, options);\r\n\t\t}\r\n");

        
        #line default
        #line hidden
        
        #line 1325 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
					
				}
			}

        
        #line default
        #line hidden
        
        #line 1328 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t}\r\n\r\n");

        
        #line default
        #line hidden
        
        #line 1331 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

			foreach(SerializedDomainProperty sP in propertiesToWriteInThisClass)
			{
				DomainProperty p = sP.DomainProperty;
				
				string isReq = "false";
				if( p.IsRequired )
					isReq = "true";
				
				if( sP.SerializationRepresentationType != SerializationRepresentationType.Attribute )
					continue;

				string modifier ="virtual";
				if( CodeGenerationUtilities.HasProperty(domainClass.BaseElement, p.Name))
					modifier = "override";

        
        #line default
        #line hidden
        
        #line 1346 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t/// <summary>\r\n\t/// Write property ");

        
        #line default
        #line hidden
        
        #line 1348 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(p.Name));

        
        #line default
        #line hidden
        
        #line 1348 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" that need to be serialized as XML attribute.\r\n\t/// </summary>\r\n\t/// <param name=" +
        "\"serializationContext\">Serialization context.</param>\r\n\t/// <param name=\"instanc" +
        "e\">");

        
        #line default
        #line hidden
        
        #line 1351 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 1351 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(@" instance to be serialized.</param>
	/// <param name=""writer"">XmlWriter to write serialized data to.</param> 
	/// <param name=""options"">Serialization options.</param>
	[global::System.Diagnostics.CodeAnalysis.SuppressMessage(""Microsoft.Maintainability"", ""CA1502:AvoidExcessiveComplexity"", Justification = ""Generated code."")]
	protected ");

        
        #line default
        #line hidden
        
        #line 1355 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(modifier));

        
        #line default
        #line hidden
        
        #line 1355 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" void WritePropertyAsAttribute");

        
        #line default
        #line hidden
        
        #line 1355 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(p.Name));

        
        #line default
        #line hidden
        
        #line 1355 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("(DslModeling::SerializationContext serializationContext, ");

        
        #line default
        #line hidden
        
        #line 1355 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 1355 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" instance, global::System.Xml.XmlWriter writer, DslEditorModeling::SerializationO" +
        "ptions options)\r\n\t{\r\n\t\t// ");

        
        #line default
        #line hidden
        
        #line 1357 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(p.Name));

        
        #line default
        #line hidden
        
        #line 1357 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\r\n\t\tobject value");

        
        #line default
        #line hidden
        
        #line 1358 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(p.Name));

        
        #line default
        #line hidden
        
        #line 1358 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" = ");

        
        #line default
        #line hidden
        
        #line 1358 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(p.Type.MetaModel.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 1358 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("SerializationHelper.Instance.ConvertTypedObjectTo(serializationContext,instance, " +
        "\"");

        
        #line default
        #line hidden
        
        #line 1358 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(p.Name));

        
        #line default
        #line hidden
        
        #line 1358 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\" ,instance.");

        
        #line default
        #line hidden
        
        #line 1358 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(p.Name));

        
        #line default
        #line hidden
        
        #line 1358 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(", typeof(");

        
        #line default
        #line hidden
        
        #line 1358 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(CodeGenerationUtilities.GetDomainTypeFullName(p)));

        
        #line default
        #line hidden
        
        #line 1358 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("), ");

        
        #line default
        #line hidden
        
        #line 1358 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(isReq));

        
        #line default
        #line hidden
        
        #line 1358 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(");\r\n");

        
        #line default
        #line hidden
        
        #line 1359 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

		if( String.IsNullOrEmpty(p.DefaultValue) )
		{

        
        #line default
        #line hidden
        
        #line 1362 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\tif( value");

        
        #line default
        #line hidden
        
        #line 1363 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(p.Name));

        
        #line default
        #line hidden
        
        #line 1363 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" != null )\r\n\t\t{\r\n\t\t\t");

        
        #line default
        #line hidden
        
        #line 1365 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(this.MetaModel.Name));

        
        #line default
        #line hidden
        
        #line 1365 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("SerializationHelper.Instance.WriteAttributeString(serializationContext, instance," +
        " writer, \"");

        
        #line default
        #line hidden
        
        #line 1365 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(sP.SerializationName));

        
        #line default
        #line hidden
        
        #line 1365 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\", value");

        
        #line default
        #line hidden
        
        #line 1365 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(p.Name));

        
        #line default
        #line hidden
        
        #line 1365 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".ToString());\r\n\t\t}\r\n");

        
        #line default
        #line hidden
        
        #line 1367 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

		}
		else
		{

        
        #line default
        #line hidden
        
        #line 1371 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\tif( value");

        
        #line default
        #line hidden
        
        #line 1372 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(p.Name));

        
        #line default
        #line hidden
        
        #line 1372 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" != null )\r\n\t\t\t");

        
        #line default
        #line hidden
        
        #line 1373 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(this.MetaModel.Name));

        
        #line default
        #line hidden
        
        #line 1373 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("SerializationHelper.Instance.WriteAttributeString(serializationContext, instance," +
        " writer, \"");

        
        #line default
        #line hidden
        
        #line 1373 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(sP.SerializationName));

        
        #line default
        #line hidden
        
        #line 1373 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\", value");

        
        #line default
        #line hidden
        
        #line 1373 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(p.Name));

        
        #line default
        #line hidden
        
        #line 1373 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".ToString());\r\n\t\telse\r\n\t\t\t");

        
        #line default
        #line hidden
        
        #line 1375 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(this.MetaModel.Name));

        
        #line default
        #line hidden
        
        #line 1375 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("SerializationHelper.Instance.WriteAttributeString(serializationContext, instance," +
        " writer, \"");

        
        #line default
        #line hidden
        
        #line 1375 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(sP.SerializationName));

        
        #line default
        #line hidden
        
        #line 1375 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\", \"\");\r\n");

        
        #line default
        #line hidden
        
        #line 1376 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

		}

        
        #line default
        #line hidden
        
        #line 1378 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t}\r\n");

        
        #line default
        #line hidden
        
        #line 1380 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

			}

        
        #line default
        #line hidden
        
        #line 1382 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\r\n\t/// <summary>\r\n\t/// This methods serializes 1) properties serialized as neste" +
        "d XML elements and 2) child model elements into XML. \r\n\t/// </summary>\r\n\t/// <pa" +
        "ram name=\"serializationContext\">Serialization context.</param>\r\n\t/// <param name" +
        "=\"element\">");

        
        #line default
        #line hidden
        
        #line 1388 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 1388 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(@" instance to be serialized.</param>
	/// <param name=""writer"">XmlWriter to write serialized data to.</param>        
	/// <param name=""options"">Serialization options.</param>
	protected override void WriteElements(DslModeling::SerializationContext serializationContext, DslModeling::ModelElement element, global::System.Xml.XmlWriter writer, DslEditorModeling::SerializationOptions options)
	{
");

        
        #line default
        #line hidden
        
        #line 1393 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

	List<SerializedEmbeddingRelationship> embRelationshipsToWrite = new List<SerializedEmbeddingRelationship>();
	List<SerializedDomainClass> embRelationshipsTargetToWrite = new List<SerializedDomainClass>();
	List<SerializedReferenceRelationship> refRelationshipsToWrite = new List<SerializedReferenceRelationship>();
	List<SerializedDomainRole> refRelationshipsRoleToWrite = new List<SerializedDomainRole>();			
	if(Children != null )
	{

        
        #line default
        #line hidden
        
        #line 1400 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t");

        
        #line default
        #line hidden
        
        #line 1401 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 1401 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" instance = element as ");

        
        #line default
        #line hidden
        
        #line 1401 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 1401 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(";\r\n\t\tglobal::System.Diagnostics.Debug.Assert(instance != null, \"Expecting an inst" +
        "ance of ");

        
        #line default
        #line hidden
        
        #line 1402 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 1402 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\");\r\n\t\t\r\n");

        
        #line default
        #line hidden
        
        #line 1404 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

		propertiesToWriteInThisClass.Clear();
		foreach(SerializationElement child in Children )
		{
			if( child is SerializedDomainProperty )
			{
				SerializedDomainProperty sP = child as SerializedDomainProperty;
				DomainProperty p = sP.DomainProperty;
				
				if( sP.OmitProperty )
					continue;				
				
				if( sP.SerializationRepresentationType != SerializationRepresentationType.Element )
					continue;
				
				if( p.Element.GetMetaModel() == this.MetaModel && p.Element == domainClass)
					propertiesToWriteInThisClass.Add(sP);

        
        #line default
        #line hidden
        
        #line 1421 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\tWritePropertyAsElement");

        
        #line default
        #line hidden
        
        #line 1422 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(p.Name));

        
        #line default
        #line hidden
        
        #line 1422 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("(serializationContext, instance, writer, options);\r\n");

        
        #line default
        #line hidden
        
        #line 1423 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

			}
			else if( child is SerializedEmbeddingRelationship)
			{
				SerializedEmbeddingRelationship sCon = child as SerializedEmbeddingRelationship;
				EmbeddingRelationship con = sCon.EmbeddingRelationship;
			
				if( sCon.OmitRelationship )
					continue;
				
				if( con.GetMetaModel() == this.MetaModel && con.Source.RolePlayer == domainClass)
					embRelationshipsToWrite.Add(sCon);


        
        #line default
        #line hidden
        
        #line 1436 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\tWriteEmbeddingRelationship");

        
        #line default
        #line hidden
        
        #line 1437 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Name));

        
        #line default
        #line hidden
        
        #line 1437 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("(serializationContext, instance, writer, options);\r\n");

        
        #line default
        #line hidden
        
        #line 1438 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

			}
			else if( child is SerializedReferenceRelationship && !(domainClass is EmbeddingRelationship))
			{
				SerializedReferenceRelationship sCon = child as SerializedReferenceRelationship;
				ReferenceRelationship con = sCon.ReferenceRelationship;
			
				if( sCon.OmitRelationship )
					continue;
				
				if( con.GetMetaModel() == this.MetaModel && con.Source.RolePlayer == domainClass )
					refRelationshipsToWrite.Add(sCon);				

        
        #line default
        #line hidden
        
        #line 1450 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\tWriteReferenceRelationship");

        
        #line default
        #line hidden
        
        #line 1451 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Name));

        
        #line default
        #line hidden
        
        #line 1451 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("(serializationContext, instance, writer, options);\r\n");

        
        #line default
        #line hidden
        
        #line 1452 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

			}
			else if( child is SerializedDomainClass && domainClass is EmbeddingRelationship )
			{
				EmbeddingRelationship con = domainClass as EmbeddingRelationship;
				SerializedDomainClass dS = child as SerializedDomainClass;
				DomainClass d = dS.DomainClass;
				
				if( d.GetMetaModel() == this.MetaModel)
					embRelationshipsTargetToWrite.Add(dS);

        
        #line default
        #line hidden
        
        #line 1462 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\tWriteEmbeddingRelationshipTarget");

        
        #line default
        #line hidden
        
        #line 1463 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Name));

        
        #line default
        #line hidden
        
        #line 1463 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(d.Name));

        
        #line default
        #line hidden
        
        #line 1463 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("(serializationContext, instance, writer, options);\r\n");

        
        #line default
        #line hidden
        
        #line 1464 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
	
			}
			else if( child is SerializedDomainRole && domainClass is ReferenceRelationship )
			{
				SerializedDomainRole sRole = child as SerializedDomainRole;
				DomainRole role = sRole.DomainRole;
				ReferenceRelationship con = domainClass as ReferenceRelationship;
				
				if( role.RolePlayer.GetMetaModel() == this.MetaModel )
					refRelationshipsRoleToWrite.Add(sRole);				
				

        
        #line default
        #line hidden
        
        #line 1475 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\tWriteReferenceRelationshipRole");

        
        #line default
        #line hidden
        
        #line 1476 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Name));

        
        #line default
        #line hidden
        
        #line 1476 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(role.Name));

        
        #line default
        #line hidden
        
        #line 1476 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("(serializationContext, instance, writer, options);\r\n");

        
        #line default
        #line hidden
        
        #line 1477 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

			}
		}
	}

        
        #line default
        #line hidden
        
        #line 1481 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t}\r\n\t\r\n");

        
        #line default
        #line hidden
        
        #line 1484 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

			foreach(SerializedDomainProperty sP in propertiesToWriteInThisClass)
			{
				DomainProperty p = sP.DomainProperty;
				
				string isReq = "false";
				if( p.IsRequired )
					isReq = "true";
				
				if( sP.SerializationRepresentationType != SerializationRepresentationType.Element )
					continue;
				
				string modifier ="virtual";
				if( CodeGenerationUtilities.HasProperty(domainClass.BaseElement, p.Name))
					modifier = "override";

        
        #line default
        #line hidden
        
        #line 1499 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t/// <summary>\r\n\t/// Write property ");

        
        #line default
        #line hidden
        
        #line 1501 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(p.Name));

        
        #line default
        #line hidden
        
        #line 1501 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" that need to be serialized as XML element.\r\n\t/// </summary>\r\n\t/// <param name=\"s" +
        "erializationContext\">Serialization context.</param>\r\n\t/// <param name=\"instance\"" +
        ">");

        
        #line default
        #line hidden
        
        #line 1504 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 1504 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(@" instance to be serialized.</param>
	/// <param name=""writer"">XmlWriter to write serialized data to.</param> 
	/// <param name=""options"">Serialization options.</param>
	[global::System.Diagnostics.CodeAnalysis.SuppressMessage(""Microsoft.Maintainability"", ""CA1502:AvoidExcessiveComplexity"", Justification = ""Generated code."")]
	protected ");

        
        #line default
        #line hidden
        
        #line 1508 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(modifier));

        
        #line default
        #line hidden
        
        #line 1508 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" void WritePropertyAsElement");

        
        #line default
        #line hidden
        
        #line 1508 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(p.Name));

        
        #line default
        #line hidden
        
        #line 1508 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("(DslModeling::SerializationContext serializationContext, ");

        
        #line default
        #line hidden
        
        #line 1508 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 1508 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" instance, global::System.Xml.XmlWriter writer, DslEditorModeling::SerializationO" +
        "ptions options)\r\n\t{\r\n\t\tif (!serializationContext.Result.Failed)\r\n\t\t{\r\n\t\t\t// ");

        
        #line default
        #line hidden
        
        #line 1512 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(p.Name));

        
        #line default
        #line hidden
        
        #line 1512 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\r\n\t\t\tobject value");

        
        #line default
        #line hidden
        
        #line 1513 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(p.Name));

        
        #line default
        #line hidden
        
        #line 1513 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" = ");

        
        #line default
        #line hidden
        
        #line 1513 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(p.Type.MetaModel.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 1513 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("SerializationHelper.Instance.ConvertTypedObjectTo(serializationContext,instance, " +
        "\"");

        
        #line default
        #line hidden
        
        #line 1513 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(p.Name));

        
        #line default
        #line hidden
        
        #line 1513 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\", instance.");

        
        #line default
        #line hidden
        
        #line 1513 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(p.Name));

        
        #line default
        #line hidden
        
        #line 1513 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(", typeof(");

        
        #line default
        #line hidden
        
        #line 1513 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(CodeGenerationUtilities.GetDomainTypeFullName(p)));

        
        #line default
        #line hidden
        
        #line 1513 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("), ");

        
        #line default
        #line hidden
        
        #line 1513 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(isReq));

        
        #line default
        #line hidden
        
        #line 1513 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(");\r\n\r\n");

        
        #line default
        #line hidden
        
        #line 1515 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

		if( String.IsNullOrEmpty(p.DefaultValue) )
		{

        
        #line default
        #line hidden
        
        #line 1518 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t\tif( value");

        
        #line default
        #line hidden
        
        #line 1519 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(p.Name));

        
        #line default
        #line hidden
        
        #line 1519 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" != null )\r\n\t\t\t{\r\n");

        
        #line default
        #line hidden
        
        #line 1521 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

				if( p.Type.SerializationStyle == SerializationStyle.CDATA )
				{

        
        #line default
        #line hidden
        
        #line 1524 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t\t\t");

        
        #line default
        #line hidden
        
        #line 1525 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(this.MetaModel.Name));

        
        #line default
        #line hidden
        
        #line 1525 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("SerializationHelper.Instance.WriteElementCDATAString(serializationContext, instan" +
        "ce, writer, \"");

        
        #line default
        #line hidden
        
        #line 1525 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(sP.SerializationName));

        
        #line default
        #line hidden
        
        #line 1525 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\", value");

        
        #line default
        #line hidden
        
        #line 1525 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(p.Name));

        
        #line default
        #line hidden
        
        #line 1525 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".ToString());\t\t\t\t\r\n");

        
        #line default
        #line hidden
        
        #line 1526 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

				}
				else
				{

        
        #line default
        #line hidden
        
        #line 1530 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t\t\t");

        
        #line default
        #line hidden
        
        #line 1531 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(this.MetaModel.Name));

        
        #line default
        #line hidden
        
        #line 1531 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("SerializationHelper.Instance.WriteElementString(serializationContext, instance, w" +
        "riter, \"");

        
        #line default
        #line hidden
        
        #line 1531 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(sP.SerializationName));

        
        #line default
        #line hidden
        
        #line 1531 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\", value");

        
        #line default
        #line hidden
        
        #line 1531 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(p.Name));

        
        #line default
        #line hidden
        
        #line 1531 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".ToString());\r\n");

        
        #line default
        #line hidden
        
        #line 1532 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

				}

        
        #line default
        #line hidden
        
        #line 1534 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t\t}\r\n");

        
        #line default
        #line hidden
        
        #line 1536 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

		}
		else
		{

        
        #line default
        #line hidden
        
        #line 1540 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t\tif( value");

        
        #line default
        #line hidden
        
        #line 1541 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(p.Name));

        
        #line default
        #line hidden
        
        #line 1541 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" != null )\r\n\t\t\t{\r\n");

        
        #line default
        #line hidden
        
        #line 1543 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

				if( p.Type.SerializationStyle == SerializationStyle.CDATA )
				{

        
        #line default
        #line hidden
        
        #line 1546 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t\t\t");

        
        #line default
        #line hidden
        
        #line 1547 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(this.MetaModel.Name));

        
        #line default
        #line hidden
        
        #line 1547 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("SerializationHelper.Instance.WriteElementCDATAString(serializationContext, instan" +
        "ce, writer, \"");

        
        #line default
        #line hidden
        
        #line 1547 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(sP.SerializationName));

        
        #line default
        #line hidden
        
        #line 1547 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\", value");

        
        #line default
        #line hidden
        
        #line 1547 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(p.Name));

        
        #line default
        #line hidden
        
        #line 1547 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".ToString());\t\t\t\t\r\n");

        
        #line default
        #line hidden
        
        #line 1548 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

				}
				else
				{

        
        #line default
        #line hidden
        
        #line 1552 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t\t\t");

        
        #line default
        #line hidden
        
        #line 1553 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(this.MetaModel.Name));

        
        #line default
        #line hidden
        
        #line 1553 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("SerializationHelper.Instance.WriteElementString(serializationContext, instance, w" +
        "riter, \"");

        
        #line default
        #line hidden
        
        #line 1553 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(sP.SerializationName));

        
        #line default
        #line hidden
        
        #line 1553 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\", value");

        
        #line default
        #line hidden
        
        #line 1553 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(p.Name));

        
        #line default
        #line hidden
        
        #line 1553 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".ToString());\r\n");

        
        #line default
        #line hidden
        
        #line 1554 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

				}

        
        #line default
        #line hidden
        
        #line 1556 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n");

        
        #line default
        #line hidden
        
        #line 1560 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

				if( p.Type.SerializationStyle == SerializationStyle.CDATA )
				{

        
        #line default
        #line hidden
        
        #line 1563 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t\t\t");

        
        #line default
        #line hidden
        
        #line 1564 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(this.MetaModel.Name));

        
        #line default
        #line hidden
        
        #line 1564 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("SerializationHelper.Instance.WriteElementCDATAString(serializationContext, instan" +
        "ce, writer, \"");

        
        #line default
        #line hidden
        
        #line 1564 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(sP.SerializationName));

        
        #line default
        #line hidden
        
        #line 1564 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\", \"\");\r\n");

        
        #line default
        #line hidden
        
        #line 1565 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

				}
				else
				{

        
        #line default
        #line hidden
        
        #line 1569 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t\t\t");

        
        #line default
        #line hidden
        
        #line 1570 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(this.MetaModel.Name));

        
        #line default
        #line hidden
        
        #line 1570 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("SerializationHelper.Instance.WriteElementString(serializationContext, instance, w" +
        "riter, \"");

        
        #line default
        #line hidden
        
        #line 1570 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(sP.SerializationName));

        
        #line default
        #line hidden
        
        #line 1570 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\", \"\");\r\n");

        
        #line default
        #line hidden
        
        #line 1571 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

				}

        
        #line default
        #line hidden
        
        #line 1573 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t\t\t\r\n\t\t\t}\r\n");

        
        #line default
        #line hidden
        
        #line 1575 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
			
		}

        
        #line default
        #line hidden
        
        #line 1577 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t\t\r\n\t\t}\t\t\r\n\t}\r\n");

        
        #line default
        #line hidden
        
        #line 1580 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

			}
			
			foreach(SerializedEmbeddingRelationship sCon in embRelationshipsToWrite)
			{
				EmbeddingRelationship con = sCon.EmbeddingRelationship;
				string modifier = "virtual";
				if( CodeGenerationUtilities.HasRelationship(domainClass.BaseElement, con.Name))
					modifier = "override";				

        
        #line default
        #line hidden
        
        #line 1589 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t/// <summary>\r\n\t/// Write emb. rel ");

        
        #line default
        #line hidden
        
        #line 1591 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Name));

        
        #line default
        #line hidden
        
        #line 1591 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" that need to be serialized as XML element.\r\n\t/// </summary>\r\n\t/// <param name=\"s" +
        "erializationContext\">Serialization context.</param>\r\n\t/// <param name=\"instance\"" +
        ">");

        
        #line default
        #line hidden
        
        #line 1594 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 1594 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(@" instance to be serialized.</param>
	/// <param name=""writer"">XmlWriter to write serialized data to.</param> 
	/// <param name=""options"">Serialization options.</param>
	[global::System.Diagnostics.CodeAnalysis.SuppressMessage(""Microsoft.Maintainability"", ""CA1502:AvoidExcessiveComplexity"", Justification = ""Generated code."")]
	protected ");

        
        #line default
        #line hidden
        
        #line 1598 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(modifier));

        
        #line default
        #line hidden
        
        #line 1598 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" void WriteEmbeddingRelationship");

        
        #line default
        #line hidden
        
        #line 1598 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Name));

        
        #line default
        #line hidden
        
        #line 1598 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("(DslModeling::SerializationContext serializationContext, ");

        
        #line default
        #line hidden
        
        #line 1598 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 1598 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" instance, global::System.Xml.XmlWriter writer, DslEditorModeling::SerializationO" +
        "ptions options)\r\n\t{\r\n");

        
        #line default
        #line hidden
        
        #line 1600 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

				if( sCon.IsTargetIncludedSubmodel )
				{
					DomainClass targetClass = con.Target.RolePlayer as DomainClass;

        
        #line default
        #line hidden
        
        #line 1604 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t");

        
        #line default
        #line hidden
        
        #line 1605 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 1605 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" allM");

        
        #line default
        #line hidden
        
        #line 1605 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Name));

        
        #line default
        #line hidden
        
        #line 1605 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("Instance = ");

        
        #line default
        #line hidden
        
        #line 1605 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 1605 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".GetLinkTo");

        
        #line default
        #line hidden
        
        #line 1605 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Source.PropertyName.TrimStart('@')));

        
        #line default
        #line hidden
        
        #line 1605 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("(instance);\r\n        if( allM");

        
        #line default
        #line hidden
        
        #line 1606 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Name));

        
        #line default
        #line hidden
        
        #line 1606 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(@"Instance != null )
		{
			DslEditorModeling::IParentModelElement parent = instance.GetDomainModelServices().ElementParentProvider.GetParentModelElement(instance);
            if (parent == null)
                throw new System.ArgumentNullException(""Parent of element "" + instance.ToString() + "" can not be null"");
			
			string path = parent.DomainFilePath;
            string vModellDirectory = new System.IO.FileInfo(path).DirectoryName;
            
			// get current path
            string curPath = (allM");

        
        #line default
        #line hidden
        
        #line 1616 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Name));

        
        #line default
        #line hidden
        
        #line 1616 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("Instance.");

        
        #line default
        #line hidden
        
        #line 1616 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Target.Name));

        
        #line default
        #line hidden
        
        #line 1616 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(@" as DslEditorModeling::IParentModelElement).DomainFilePath;

            // update v-modell path
            string relPath = Tum.PDE.ToolFramework.Modeling.Visualization.VMXExtensions.Path.PathHelper.EvaluateRelativePath(
                vModellDirectory, curPath);

            // remove all DirectorySeparatorChars on the left, so we dont get a path like ////name/name.xml
            while(relPath.Length > 0 )
            {
                if (relPath[0] == System.IO.Path.DirectorySeparatorChar)
                    relPath = relPath.Remove(0, 1);
                else
                    break;
            }
			
			writer.WriteStartElement(""xi"", ""include"", null);
            writer.WriteAttributeString(""href"", relPath);
            writer.WriteEndElement();

            if (options.SerializationMode == DslEditorModeling::SerializationMode.Normal)
            {
                // save
                ");

        
        #line default
        #line hidden
        
        #line 1638 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(targetClass.GetMetaModel().GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 1638 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("SerializationHelper.Instance.SaveModel");

        
        #line default
        #line hidden
        
        #line 1638 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(targetClass.Name));

        
        #line default
        #line hidden
        
        #line 1638 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("(serializationContext.Result, allM");

        
        #line default
        #line hidden
        
        #line 1638 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Name));

        
        #line default
        #line hidden
        
        #line 1638 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("Instance.");

        
        #line default
        #line hidden
        
        #line 1638 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Target.Name));

        
        #line default
        #line hidden
        
        #line 1638 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(", curPath, writer.Settings.Encoding, false);\r\n            }\t\t\t\r\n\t\t}\r\n");

        
        #line default
        #line hidden
        
        #line 1641 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

				}
				else
				{

        
        #line default
        #line hidden
        
        #line 1645 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\r\n\t\t#region Save EmbeddingRelationship ");

        
        #line default
        #line hidden
        
        #line 1646 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Name));

        
        #line default
        #line hidden
        
        #line 1646 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\r\n");

        
        #line default
        #line hidden
        
        #line 1647 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

				bool bSerializeInFullForm = con.NeedsFullSerialization() || sCon.IsInFullSerialization;
				if( con.Source.Multiplicity == Tum.PDE.LanguageDSL.Multiplicity.ZeroMany || con.Source.Multiplicity == Tum.PDE.LanguageDSL.Multiplicity.OneMany )
				{

        
        #line default
        #line hidden
        
        #line 1651 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\tglobal::System.Collections.ObjectModel.ReadOnlyCollection<");

        
        #line default
        #line hidden
        
        #line 1652 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 1652 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("> allM");

        
        #line default
        #line hidden
        
        #line 1652 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Name));

        
        #line default
        #line hidden
        
        #line 1652 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("Instances = ");

        
        #line default
        #line hidden
        
        #line 1652 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 1652 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".GetLinksTo");

        
        #line default
        #line hidden
        
        #line 1652 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Source.PropertyName.TrimStart('@')));

        
        #line default
        #line hidden
        
        #line 1652 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("(instance);\r\n\t\tforeach(");

        
        #line default
        #line hidden
        
        #line 1653 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 1653 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" allM");

        
        #line default
        #line hidden
        
        #line 1653 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Name));

        
        #line default
        #line hidden
        
        #line 1653 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("Instance in allM");

        
        #line default
        #line hidden
        
        #line 1653 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Name));

        
        #line default
        #line hidden
        
        #line 1653 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("Instances)\r\n\t\t{\r\n");

        
        #line default
        #line hidden
        
        #line 1655 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

				}
				else
				{

        
        #line default
        #line hidden
        
        #line 1659 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t");

        
        #line default
        #line hidden
        
        #line 1660 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 1660 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" allM");

        
        #line default
        #line hidden
        
        #line 1660 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Name));

        
        #line default
        #line hidden
        
        #line 1660 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("Instance = ");

        
        #line default
        #line hidden
        
        #line 1660 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 1660 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".GetLinkTo");

        
        #line default
        #line hidden
        
        #line 1660 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Source.PropertyName.TrimStart('@')));

        
        #line default
        #line hidden
        
        #line 1660 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("(instance);\r\n\t\tif( allM");

        
        #line default
        #line hidden
        
        #line 1661 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Name));

        
        #line default
        #line hidden
        
        #line 1661 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("Instance != null )\r\n\t\t{\r\n");

        
        #line default
        #line hidden
        
        #line 1663 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

				}

        
        #line default
        #line hidden
        
        #line 1665 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t\tif (!serializationContext.Result.Failed)\r\n\t\t\t{\r\n");

        
        #line default
        #line hidden
        
        #line 1668 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

				if (bSerializeInFullForm)
				{

        
        #line default
        #line hidden
        
        #line 1671 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t\t\t// Relationship will be serialized in full-form.\r\n\t\t\t\tDslModeling::ModelEleme" +
        "nt targetElement = allM");

        
        #line default
        #line hidden
        
        #line 1673 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Name));

        
        #line default
        #line hidden
        
        #line 1673 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(@"Instance;
				DslEditorModeling::SerializationDomainClassXmlSerializer targetSerializer = serializationContext.Directory.GetSerializer(targetElement.GetDomainClass().Id) as DslEditorModeling::SerializationDomainClassXmlSerializer;
				global::System.Diagnostics.Debug.Assert(targetSerializer != null, ""Cannot find serializer for "" + targetElement.GetDomainClass().Name + ""!"");			
				targetSerializer.Write(serializationContext, targetElement, writer, options);
");

        
        #line default
        #line hidden
        
        #line 1677 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

				}
				else
				{

        
        #line default
        #line hidden
        
        #line 1681 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t\t\t// No need to serialize the relationship itself, just serialize the role-play" +
        "er directly.\r\n\t\t\t\tDslModeling::ModelElement targetElement = allM");

        
        #line default
        #line hidden
        
        #line 1683 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Name));

        
        #line default
        #line hidden
        
        #line 1683 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("Instance.");

        
        #line default
        #line hidden
        
        #line 1683 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Target.Name));

        
        #line default
        #line hidden
        
        #line 1683 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(@";
				DslEditorModeling::SerializationDomainClassXmlSerializer targetSerializer = serializationContext.Directory.GetSerializer(targetElement.GetDomainClass().Id) as DslEditorModeling::SerializationDomainClassXmlSerializer;
				global::System.Diagnostics.Debug.Assert(targetSerializer != null, ""Cannot find serializer for "" + targetElement.GetDomainClass().Name + ""!"");			
				targetSerializer.Write(serializationContext, targetElement, writer, options);
");

        
        #line default
        #line hidden
        
        #line 1687 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

				}

        
        #line default
        #line hidden
        
        #line 1689 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t\t}\r\n\t\t}\r\n\t\t#endregion\t\t\r\n");

        
        #line default
        #line hidden
        
        #line 1693 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

				}

        
        #line default
        #line hidden
        
        #line 1695 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t}\r\n");

        
        #line default
        #line hidden
        
        #line 1697 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

			}
			
			foreach(SerializedReferenceRelationship sCon in refRelationshipsToWrite)
			{
				ReferenceRelationship con = sCon.ReferenceRelationship;
				string modifier = "virtual";
				if( CodeGenerationUtilities.HasRelationship(domainClass.BaseElement, con.Name))
					modifier = "override";	

        
        #line default
        #line hidden
        
        #line 1706 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t/// <summary>\r\n\t/// Write ref. rel ");

        
        #line default
        #line hidden
        
        #line 1708 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Name));

        
        #line default
        #line hidden
        
        #line 1708 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" that need to be serialized as XML element.\r\n\t/// </summary>\r\n\t/// <param name=\"s" +
        "erializationContext\">Serialization context.</param>\r\n\t/// <param name=\"instance\"" +
        ">");

        
        #line default
        #line hidden
        
        #line 1711 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 1711 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(@" instance to be serialized.</param>
	/// <param name=""writer"">XmlWriter to write serialized data to.</param> 
	/// <param name=""options"">Serialization options.</param>
	[global::System.Diagnostics.CodeAnalysis.SuppressMessage(""Microsoft.Maintainability"", ""CA1502:AvoidExcessiveComplexity"", Justification = ""Generated code."")]
	protected ");

        
        #line default
        #line hidden
        
        #line 1715 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(modifier));

        
        #line default
        #line hidden
        
        #line 1715 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" void WriteReferenceRelationship");

        
        #line default
        #line hidden
        
        #line 1715 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Name));

        
        #line default
        #line hidden
        
        #line 1715 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("(DslModeling::SerializationContext serializationContext, ");

        
        #line default
        #line hidden
        
        #line 1715 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 1715 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" instance, global::System.Xml.XmlWriter writer, DslEditorModeling::SerializationO" +
        "ptions options)\r\n\t{\r\n\t\t#region Save ReferenceRelationship ");

        
        #line default
        #line hidden
        
        #line 1717 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Name));

        
        #line default
        #line hidden
        
        #line 1717 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\r\n");

        
        #line default
        #line hidden
        
        #line 1718 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
				
				bool bSerializeInFullForm = con.NeedsFullSerialization() || sCon.IsInFullSerialization;
				if( con.Source.Multiplicity == Tum.PDE.LanguageDSL.Multiplicity.ZeroMany || con.Source.Multiplicity == Tum.PDE.LanguageDSL.Multiplicity.OneMany )
				{

        
        #line default
        #line hidden
        
        #line 1722 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\tglobal::System.Collections.ObjectModel.ReadOnlyCollection<");

        
        #line default
        #line hidden
        
        #line 1723 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 1723 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("> allM");

        
        #line default
        #line hidden
        
        #line 1723 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Name));

        
        #line default
        #line hidden
        
        #line 1723 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("Instances = ");

        
        #line default
        #line hidden
        
        #line 1723 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 1723 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".GetLinksTo");

        
        #line default
        #line hidden
        
        #line 1723 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Source.PropertyName.TrimStart('@')));

        
        #line default
        #line hidden
        
        #line 1723 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("(instance);\r\n\t\tforeach(");

        
        #line default
        #line hidden
        
        #line 1724 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 1724 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" allM");

        
        #line default
        #line hidden
        
        #line 1724 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Name));

        
        #line default
        #line hidden
        
        #line 1724 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("Instance in allM");

        
        #line default
        #line hidden
        
        #line 1724 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Name));

        
        #line default
        #line hidden
        
        #line 1724 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("Instances)\r\n\t\t{\r\n");

        
        #line default
        #line hidden
        
        #line 1726 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

				}
				else
				{

        
        #line default
        #line hidden
        
        #line 1730 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t");

        
        #line default
        #line hidden
        
        #line 1731 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 1731 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" allM");

        
        #line default
        #line hidden
        
        #line 1731 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Name));

        
        #line default
        #line hidden
        
        #line 1731 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("Instance = ");

        
        #line default
        #line hidden
        
        #line 1731 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 1731 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".GetLinkTo");

        
        #line default
        #line hidden
        
        #line 1731 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Source.PropertyName.TrimStart('@')));

        
        #line default
        #line hidden
        
        #line 1731 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("(instance);\r\n\t\tif( allM");

        
        #line default
        #line hidden
        
        #line 1732 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Name));

        
        #line default
        #line hidden
        
        #line 1732 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("Instance != null )\r\n\t\t{\r\n");

        
        #line default
        #line hidden
        
        #line 1734 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

				}

        
        #line default
        #line hidden
        
        #line 1736 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t\tif (!serializationContext.Result.Failed)\r\n\t\t\t{\r\n");

        
        #line default
        #line hidden
        
        #line 1739 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

				if( bSerializeInFullForm )
				{

        
        #line default
        #line hidden
        
        #line 1742 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t\t\t// Full serialization mode\r\n\t\t\t\tDslModeling::ModelElement targetElement = all" +
        "M");

        
        #line default
        #line hidden
        
        #line 1744 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Name));

        
        #line default
        #line hidden
        
        #line 1744 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(@"Instance;
				DslEditorModeling::SerializationDomainClassXmlSerializer targetSerializer = serializationContext.Directory.GetSerializer(targetElement.GetDomainClass().Id) as DslEditorModeling::SerializationDomainClassXmlSerializer;
				global::System.Diagnostics.Debug.Assert(targetSerializer != null, ""Cannot find serializer for "" + targetElement.GetDomainClass().Name + ""!"");			
				targetSerializer.Write(serializationContext, targetElement, writer, options);
");

        
        #line default
        #line hidden
        
        #line 1748 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

				}
				else
				{

        
        #line default
        #line hidden
        
        #line 1752 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t\t\t// Write target link\r\n\t\t\t\twriter.WriteStartElement(\"");

        
        #line default
        #line hidden
        
        #line 1754 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.SerializationTargetName));

        
        #line default
        #line hidden
        
        #line 1754 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\");\r\n\t\t\t\tstring valueId = ");

        
        #line default
        #line hidden
        
        #line 1755 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(this.MetaModel.Name));

        
        #line default
        #line hidden
        
        #line 1755 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("SerializationHelper.Instance.ConvertIdTo(serializationContext, (allM");

        
        #line default
        #line hidden
        
        #line 1755 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Name));

        
        #line default
        #line hidden
        
        #line 1755 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("Instance ).");

        
        #line default
        #line hidden
        
        #line 1755 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Target.Name));

        
        #line default
        #line hidden
        
        #line 1755 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".Id);\r\n\t\t\t\twriter.WriteAttributeString(\"");

        
        #line default
        #line hidden
        
        #line 1756 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.SerializationAttributeName));

        
        #line default
        #line hidden
        
        #line 1756 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\", valueId);\r\n\t\t\t\twriter.WriteEndElement();\r\n");

        
        #line default
        #line hidden
        
        #line 1758 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

				}

        
        #line default
        #line hidden
        
        #line 1760 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\t\t}\r\n\t\t}\r\n\t\t#endregion\t\r\n\t}\r\n");

        
        #line default
        #line hidden
        
        #line 1765 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

			}
			
			foreach(SerializedDomainClass dS in embRelationshipsTargetToWrite)
			{
				EmbeddingRelationship con = domainClass as EmbeddingRelationship;
				DomainClass d = dS.DomainClass;

        
        #line default
        #line hidden
        
        #line 1772 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t/// <summary>\r\n\t/// Write emb. rel ");

        
        #line default
        #line hidden
        
        #line 1774 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Name));

        
        #line default
        #line hidden
        
        #line 1774 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" target ");

        
        #line default
        #line hidden
        
        #line 1774 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(d.Name));

        
        #line default
        #line hidden
        
        #line 1774 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" that need to be serialized as XML element.\r\n\t/// </summary>\r\n\t/// <param name=\"s" +
        "erializationContext\">Serialization context.</param>\r\n\t/// <param name=\"instance\"" +
        ">");

        
        #line default
        #line hidden
        
        #line 1777 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 1777 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(@" instance to be serialized.</param>
	/// <param name=""writer"">XmlWriter to write serialized data to.</param> 
	/// <param name=""options"">Serialization options.</param>
	[global::System.Diagnostics.CodeAnalysis.SuppressMessage(""Microsoft.Maintainability"", ""CA1502:AvoidExcessiveComplexity"", Justification = ""Generated code."")]
	protected virtual void WriteEmbeddingRelationshipTarget");

        
        #line default
        #line hidden
        
        #line 1781 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Name));

        
        #line default
        #line hidden
        
        #line 1781 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(d.Name));

        
        #line default
        #line hidden
        
        #line 1781 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("(DslModeling::SerializationContext serializationContext, ");

        
        #line default
        #line hidden
        
        #line 1781 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 1781 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" instance, global::System.Xml.XmlWriter writer, DslEditorModeling::SerializationO" +
        "ptions options)\r\n\t{\r\n\t\t#region Save EmbeddingRelationship Target Element (");

        
        #line default
        #line hidden
        
        #line 1783 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(d.Name));

        
        #line default
        #line hidden
        
        #line 1783 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(")\r\n\t\tif (!serializationContext.Result.Failed)\r\n\t\t{\r\n\t\t\t");

        
        #line default
        #line hidden
        
        #line 1786 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 1786 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" rs = instance;\r\n\t\t\t\r\n\t\t\t// Write target link\r\n\t\t\t//DslModeling::ModelElement tar" +
        "getElement = rs.");

        
        #line default
        #line hidden
        
        #line 1789 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(d.Name));

        
        #line default
        #line hidden
        
        #line 1789 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(@";
			DslModeling::ModelElement targetElement = DslModeling::DomainRoleInfo.GetTargetRolePlayer(rs);
			DslEditorModeling::SerializationDomainClassXmlSerializer targetSerializer = serializationContext.Directory.GetSerializer(targetElement.GetDomainClass().Id) as DslEditorModeling::SerializationDomainClassXmlSerializer;
			global::System.Diagnostics.Debug.Assert(targetSerializer != null, ""Cannot find serializer for "" + targetElement.GetDomainClass().Name + ""!"");			
			targetSerializer.Write(serializationContext, targetElement, writer, options);
		}
		#endregion		
	}
");

        
        #line default
        #line hidden
        
        #line 1797 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

			}
			
			foreach(SerializedDomainRole sRole in refRelationshipsRoleToWrite)
			{
				DomainRole role = sRole.DomainRole;
				ReferenceRelationship con = domainClass as ReferenceRelationship;				

        
        #line default
        #line hidden
        
        #line 1804 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t/// <summary>\r\n\t/// Write ref. rel ");

        
        #line default
        #line hidden
        
        #line 1806 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Name));

        
        #line default
        #line hidden
        
        #line 1806 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" role ");

        
        #line default
        #line hidden
        
        #line 1806 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(role.Name));

        
        #line default
        #line hidden
        
        #line 1806 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" that need to be serialized as XML element.\r\n\t/// </summary>\r\n\t/// <param name=\"s" +
        "erializationContext\">Serialization context.</param>\r\n\t/// <param name=\"instance\"" +
        ">");

        
        #line default
        #line hidden
        
        #line 1809 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 1809 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(@" instance to be serialized.</param>
	/// <param name=""writer"">XmlWriter to write serialized data to.</param> 
	/// <param name=""options"">Serialization options.</param>
	[global::System.Diagnostics.CodeAnalysis.SuppressMessage(""Microsoft.Maintainability"", ""CA1502:AvoidExcessiveComplexity"", Justification = ""Generated code."")]
	protected virtual void WriteReferenceRelationshipRole");

        
        #line default
        #line hidden
        
        #line 1813 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(con.Name));

        
        #line default
        #line hidden
        
        #line 1813 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(role.Name));

        
        #line default
        #line hidden
        
        #line 1813 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("(DslModeling::SerializationContext serializationContext, ");

        
        #line default
        #line hidden
        
        #line 1813 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.GetFullName(true)));

        
        #line default
        #line hidden
        
        #line 1813 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" instance, global::System.Xml.XmlWriter writer, DslEditorModeling::SerializationO" +
        "ptions options)\r\n\t{\r\n\t\t#region Save ReferenceRelationship ");

        
        #line default
        #line hidden
        
        #line 1815 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.Name));

        
        #line default
        #line hidden
        
        #line 1815 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" Roles\r\n\t\tif (!serializationContext.Result.Failed)\r\n\t\t{\r\n\t\t\t// Write ");

        
        #line default
        #line hidden
        
        #line 1818 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(role.Name));

        
        #line default
        #line hidden
        
        #line 1818 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" link id\r\n\t\t\twriter.WriteStartElement(\"");

        
        #line default
        #line hidden
        
        #line 1819 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(sRole.SerializationName));

        
        #line default
        #line hidden
        
        #line 1819 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\");\r\n\t\t\tstring valueId = ");

        
        #line default
        #line hidden
        
        #line 1820 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(this.MetaModel.Name));

        
        #line default
        #line hidden
        
        #line 1820 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("SerializationHelper.Instance.ConvertIdTo(serializationContext, instance.");

        
        #line default
        #line hidden
        
        #line 1820 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(role.Name));

        
        #line default
        #line hidden
        
        #line 1820 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".Id);\r\n\t\t\twriter.WriteAttributeString(\"");

        
        #line default
        #line hidden
        
        #line 1821 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(sRole.SerializationAttributeName));

        
        #line default
        #line hidden
        
        #line 1821 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\", valueId);\r\n\t\t\twriter.WriteEndElement();\r\n\t\t}\r\n\t\t#endregion\t\t\r\n\t}\r\n");

        
        #line default
        #line hidden
        
        #line 1826 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

			}

        
        #line default
        #line hidden
        
        #line 1828 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\t\r\n\t\r\n\t#endregion\r\n}\r\n");

        
        #line default
        #line hidden
        
        #line 1832 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
 
	if (domainClass.GeneratesDoubleDerived)
	{

        
        #line default
        #line hidden
        
        #line 1835 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\r\n/// <summary>\r\n/// Serializer ");

        
        #line default
        #line hidden
        
        #line 1838 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(serializerClassName));

        
        #line default
        #line hidden
        
        #line 1838 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" for DomainClass ");

        
        #line default
        #line hidden
        
        #line 1838 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.GetRelativeName(namespaceString, false)));

        
        #line default
        #line hidden
        
        #line 1838 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(".\r\n/// </summary>\r\n");

        
        #line default
        #line hidden
        
        #line 1840 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

		if (inheritanceDepth > 5)
		{

        
        #line default
        #line hidden
        
        #line 1843 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("[global::System.Diagnostics.CodeAnalysis.SuppressMessage(\"Microsoft.Maintainabili" +
        "ty\", \"CA1501:AvoidExcessiveInheritance\", Justification = \"Generated code.\")]\r\n");

        
        #line default
        #line hidden
        
        #line 1845 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

		}

        
        #line default
        #line hidden
        
        #line 1848 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(CodeGenerationUtilities.GetAccessModifier(domainClass.AccessModifier)));

        
        #line default
        #line hidden
        
        #line 1848 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(domainClass.InheritanceModifier == InheritanceModifier.Sealed ? " sealed" : string.Empty));

        
        #line default
        #line hidden
        
        #line 1848 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" partial class ");

        
        #line default
        #line hidden
        
        #line 1848 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(serializerClassName));

        
        #line default
        #line hidden
        
        #line 1848 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" : ");

        
        #line default
        #line hidden
        
        #line 1848 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(serializerGenerationClassName));

        
        #line default
        #line hidden
        
        #line 1848 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("\r\n{\r\n\t#region Constructor\r\n\t/// <summary>\r\n\t/// ");

        
        #line default
        #line hidden
        
        #line 1852 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(serializerClassName));

        
        #line default
        #line hidden
        
        #line 1852 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" Constructor\r\n\t/// </summary>\r\n\tpublic ");

        
        #line default
        #line hidden
        
        #line 1854 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(this.ToStringHelper.ToStringWithCulture(serializerClassName));

        
        #line default
        #line hidden
        
        #line 1854 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write(" ()\r\n\t\t: base ()\r\n\t{\r\n\t}\r\n\t#endregion\r\n}\r\n");

        
        #line default
        #line hidden
        
        #line 1860 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

	}	

        
        #line default
        #line hidden
        
        #line 1864 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
	
	PopIndent();

        
        #line default
        #line hidden
        
        #line 1866 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"
this.Write("}\r\n");

        
        #line default
        #line hidden
        
        #line 1868 "J:\Uni\CC Processes\Werkzeuge\PDE 2\Tum.PDE.ToolFramework\Tum.PDE.ToolFramework.Templates\DomainClassSerializer.tt"

	return this.MetaModel.Name + domainClass.Name + "Serializer";
}
private void AddDomainClassResources(AttributedDomainElement c, Dictionary<string, KeyValuePair<string, string>> resourcedStrings, string commentString, string propertyCommentString)
{
	string fullName = c.GetFullName(false);
	resourcedStrings.Add(fullName+".Description", new KeyValuePair<string, string>(c.Description, String.Format(CultureInfo.CurrentCulture, commentString, "Description", "DomainClass", c.Name)));
	resourcedStrings.Add(fullName+".DisplayName", new KeyValuePair<string, string>(c.DisplayName, String.Format(CultureInfo.CurrentCulture, commentString, "DisplayName", "DomainClass", c.Name)));
	
	foreach(DomainProperty p in c.Properties)
	{
		resourcedStrings.Add(fullName+"/"+p.Name+".Description", new KeyValuePair<string, string>(p.Description, String.Format(CultureInfo.CurrentCulture, propertyCommentString, "Description", "DomainProperty", p.Name, "DomainClass", c.Name)));
		resourcedStrings.Add(fullName+"/"+p.Name+".DisplayName", new KeyValuePair<string, string>(p.DisplayName, String.Format(CultureInfo.CurrentCulture, propertyCommentString, "DisplayName", "DomainProperty", p.Name, "DomainClass", c.Name)));
		if(!String.IsNullOrEmpty(p.Category))
		{
			resourcedStrings.Add(fullName+"/"+p.Name+".Category", new KeyValuePair<string, string>(p.Category, String.Format(CultureInfo.CurrentCulture, propertyCommentString, "Category", "DomainProperty", p.Name, "DomainClass", c.Name)));
		}
	}
}