Example #1
0
        /// <summary>
        /// Generates the source code from the T4 code factory.
        /// </summary>
        /// <param name="modelData">Model data object used by the T4 factory.</param>
        /// <returns>The generated source code.</returns>
        public static string GenerateSource(object modelData)
        {
            var factory = new LogicCodeFactory {
                CsModels = null, ModelData = modelData
            };

            return(factory.TransformText());
        }
Example #2
0
        /// <summary>
        /// Generates the source code from the T4 code factory.
        /// </summary>
        /// <param name="modelStore">The C# model storage that contains all the models to be used with the T4 factory.</param>
        /// <returns>The generated source code.</returns>
        public static string GenerateSource(CsModelStore modelStore)
        {
            var factory = new LogicCodeFactory {
                CsModels = modelStore, ModelData = null
            };

            return(factory.TransformText());
        }