Esempio n. 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 MiddlewareConversion {
                CsModels = null, ModelData = modelData
            };

            return(factory.TransformText());
        }
Esempio n. 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 MiddlewareConversion {
                CsModels = modelStore, ModelData = null
            };

            return(factory.TransformText());
        }