internal ITemplate GetTemplate(string templateText, IDictionary <string, object?> variableTemplate, string templateName, string?templatePath) { Settings.IsReadOnly = true; return(Settings.DynamicTemplates ? (ITemplate)DynamicTemplate.LoadTemplate(this, templateText, templateName, templatePath) : CompiledTemplate.LoadTemplate(this, templateText, variableTemplate, templateName, templatePath)); }
internal DynamicTemplate GetDynamicTemplate(string templateText, string?templateName, string?templatePath) { Settings.IsReadOnly = true; if (Settings.DynamicTemplates == false) { throw new NotImplementedException(); } return(DynamicTemplate.LoadTemplate(this, templateText, templateName, templatePath)); }
public void start(DynamicTemplate template, Message message, IVkApi api) { timer = new Timer(1000); timer.AutoReset = true; timer.Elapsed += OnElapsed; this.template = template; this.api = api; peerId = message.PeerId.Value; messageId = message.Id.Value; timer.Start(); }
private void Run(List <TableDefinition> tables, DynamicTemplate template) { Commands = TemplateParser.Parse(template); foreach (TableDefinition table in tables) { SetGlobalVariable("TableName", "string", table.TableName); CodeFile = CodeFileFactory.Create(template.FileType); foreach (CommandBase command in Commands) { command.Execute(); } } }
private static void Main(string[] args) { //DatabaseDataSourceStrategy databaseDataSourceStrategy = new DatabaseDataSourceStrategy(); //((DataSourceStrategyBase)databaseDataSourceStrategy).Settings = "Server=RHALE78-5-1102;Database=ExpressRecipe.Logging;Trusted_Connection=True;"; //databaseDataSourceStrategy.GetAllTables(); DynamicTemplate template = new DynamicTemplate(); template.LoadSingleLine("this is a test"); template.LoadSingleLine("!@this is a test@!"); template.LoadSingleLine("!@this@! is a test"); template.LoadSingleLine("!@this@! is a !@test@!"); template.LoadSingleLine("@!this@! is !@a !@test"); template.LoadSingleLine("!@this!@ is @!a @!test"); CommandInterpreter interpreter = new CommandInterpreter(); interpreter.SetVariable("test", "string", "test123"); interpreter.SetVariable("test", "123"); dynamic tmp = interpreter.GetVariableValue("test"); int a = 0; }
public DynamicTemplateDescriptor(IConnectionSettingsValues connectionSettings) { this._Template = new DynamicTemplate(); this._connectionSettings = connectionSettings; }