/// <summary> /// Generates the code for the domain service class. /// </summary> /// <param name="language">The language to use.</param> /// <param name="className">The name of the class.</param> /// <param name="namespaceName">The namespace to use for the class.</param> /// <param name="rootNamespace">The root namespace (VB).</param> /// <returns>A value containing the generated source code and necessary references.</returns> public IGeneratedCode GenerateBusinessLogicClass(string language, string className, string namespaceName, string rootNamespace) { using (CodeGenContext codeGenContext = new CodeGenContext(language, rootNamespace)) { this.GenerateBusinessLogicClass(codeGenContext, className, namespaceName); return(codeGenContext.GenerateCode()); } }
/// <summary> /// Generates the code for the domain service class. /// </summary> /// <param name="language">The language to use.</param> /// <param name="rootNamespace">The root namespace (VB).</param> /// <param name="optionalSuffix">If nonblank, the suffix to append to namespace and class names for testing</param> /// <returns>A value containing the generated source code and necessary references.</returns> public IGeneratedCode GenerateMetadataClasses(string language, string rootNamespace, string optionalSuffix) { using (CodeGenContext codeGenContext = new CodeGenContext(language, rootNamespace)) { bool generatedAnyCode = this.GenerateMetadataClasses(codeGenContext, optionalSuffix); if (generatedAnyCode) { IGeneratedCode generatedCode = codeGenContext.GenerateCode(); return(generatedCode); } } // Did not generate any code -- return empty tuple return(new GeneratedCode()); }
/// <summary> /// Generates the code for the domain service class. /// </summary> /// <param name="language">The language to use.</param> /// <param name="rootNamespace">The root namespace (VB).</param> /// <param name="optionalSuffix">If nonblank, the suffix to append to namespace and class names for testing</param> /// <returns>A value containing the generated source code and necessary references.</returns> public IGeneratedCode GenerateMetadataClasses(string language, string rootNamespace, string optionalSuffix) { using (CodeGenContext codeGenContext = new CodeGenContext(language, rootNamespace)) { bool generatedAnyCode = this.GenerateMetadataClasses(codeGenContext, optionalSuffix); if (generatedAnyCode) { IGeneratedCode generatedCode = codeGenContext.GenerateCode(); return generatedCode; } } // Did not generate any code -- return empty tuple return new GeneratedCode(); }
/// <summary> /// Generates the code for the domain service class. /// </summary> /// <param name="language">The language to use.</param> /// <param name="className">The name of the class.</param> /// <param name="namespaceName">The namespace to use for the class.</param> /// <param name="rootNamespace">The root namespace (VB).</param> /// <returns>A value containing the generated source code and necessary references.</returns> public IGeneratedCode GenerateBusinessLogicClass(string language, string className, string namespaceName, string rootNamespace) { using (CodeGenContext codeGenContext = new CodeGenContext(language, rootNamespace)) { this.GenerateBusinessLogicClass(codeGenContext, className, namespaceName); return codeGenContext.GenerateCode(); } }