예제 #1
0
        /// <summary>
        /// Creates the code type declaration for the given input model element
        /// </summary>
        /// <param name="input">The input model element</param>
        /// <param name="context">The transformation context</param>
        /// <returns>The code type declaration that will be the transformation result for the given enumeration</returns>
        public override CodeTypeDeclaration CreateOutput(T input, ITransformationContext context)
        {
            var declaration = CodeDomHelper.CreateTypeDeclarationWithReference(GetName(input), true);

            declaration.IsEnum = true;
            return(declaration);
        }
예제 #2
0
 /// <summary>
 /// Creates the output the transformation rule
 /// </summary>
 /// <param name="input">The input model element</param>
 /// <param name="context">The transformaton context</param>
 /// <returns>A new code type declaration with set reference that references back to the code declaration</returns>
 public override CodeTypeDeclaration CreateOutput(T input, ITransformationContext context)
 {
     return(CodeDomHelper.CreateTypeDeclarationWithReference(GetName(input), true));
 }