/// <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 AddMemberMethod { CsModels = null, ModelData = modelData }; return(factory.TransformText()); }
/// <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 AddMemberMethod { CsModels = modelStore, ModelData = null }; return(factory.TransformText()); }