Ejemplo n.º 1
0
        /// <summary>
        /// Create the template output
        /// </summary>
        public virtual string TransformText()
        {
            this.Write("\r\n");

            #line 7 "E:\Xenko Projects\XenoSpace\CodeGeneration.TemplatesT4\Templates\Internal\TypeNestingStart.tt"
            foreach (var n in this.Nesting)
            {
            #line default
            #line hidden
                this.Write("\tpartial ");

            #line 8 "E:\Xenko Projects\XenoSpace\CodeGeneration.TemplatesT4\Templates\Internal\TypeNestingStart.tt"
                this.Write(this.ToStringHelper.ToStringWithCulture(TypeAnalysis.GetTypeKeyword(n)));

            #line default
            #line hidden
                this.Write(" ");

            #line 8 "E:\Xenko Projects\XenoSpace\CodeGeneration.TemplatesT4\Templates\Internal\TypeNestingStart.tt"
                this.Write(this.ToStringHelper.ToStringWithCulture(ClassMaker.MakeTypedTypeName(n)));

            #line default
            #line hidden
                this.Write(" {\r\n");

            #line 9 "E:\Xenko Projects\XenoSpace\CodeGeneration.TemplatesT4\Templates\Internal\TypeNestingStart.tt"
            }

            #line default
            #line hidden
            return(this.GenerationEnvironment.ToString());
        }
        /// <summary>
        /// Create the template output
        /// </summary>
        public virtual string TransformText()
        {
            this.Write("\r\n\t\tpublic override bool Equals(object obj)\r\n        {\r\n            if (obj is ");

            #line 9 "E:\Xenko Projects\XenoSpace\CodeGeneration.TemplatesT4\Templates\Internal\EqualsConformity.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(ClassMaker.MakeTypedTypeName(this.TypeInfo)));

            #line default
            #line hidden
            this.Write(" c)\r\n                return this.Equals(c);\r\n\r\n            return false;\r\n       " +
                       " }\r\n\r\n        public static bool operator == (");

            #line 15 "E:\Xenko Projects\XenoSpace\CodeGeneration.TemplatesT4\Templates\Internal\EqualsConformity.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(ClassMaker.MakeTypedTypeName(this.TypeInfo)));

            #line default
            #line hidden
            this.Write(" left, ");

            #line 15 "E:\Xenko Projects\XenoSpace\CodeGeneration.TemplatesT4\Templates\Internal\EqualsConformity.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(ClassMaker.MakeTypedTypeName(this.TypeInfo)));

            #line default
            #line hidden
            this.Write(@" right)
        {
            if (object.ReferenceEquals(left, null))
			{
				if (object.ReferenceEquals(right, null))
					return true;
					
				return false;
			}
			
			return left.Equals(right);
        }

        public static bool operator != (");

            #line 28 "E:\Xenko Projects\XenoSpace\CodeGeneration.TemplatesT4\Templates\Internal\EqualsConformity.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(ClassMaker.MakeTypedTypeName(this.TypeInfo)));

            #line default
            #line hidden
            this.Write(" left, ");

            #line 28 "E:\Xenko Projects\XenoSpace\CodeGeneration.TemplatesT4\Templates\Internal\EqualsConformity.tt"
            this.Write(this.ToStringHelper.ToStringWithCulture(ClassMaker.MakeTypedTypeName(this.TypeInfo)));

            #line default
            #line hidden
            this.Write(" right)\r\n        {\r\n            if (object.ReferenceEquals(left, null))\r\n\t\t\t{\r\n\t\t" +
                       "\t\tif (object.ReferenceEquals(right, null))\r\n\t\t\t\t\treturn false;\r\n\r\n\t\t\t\treturn tru" +
                       "e;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn left.Equals(right) == false;\r\n        }");
            return(this.GenerationEnvironment.ToString());
        }