public ChoServiceInstallerRecoverySettings RunProgram(int delayInMin, string exePath, params string[] parameters) { AddToRecoveryActions("run", delayInMin); Command = new ChoCDATA("{0} {1}".FormatString(exePath, String.Join(" ", parameters))); return(this); }
public ChoServiceInstallerRecoverySettings RebootSystem(int delayInMin, string broadcastMsg) { AddToRecoveryActions("reboot", delayInMin); RebootMessage = new ChoCDATA(broadcastMsg); return(this); }
protected override bool ApplyPropertyValues(ChoPlugInBuilderProperty plugInBuilderProperty, string propertyName) { if (plugInBuilderProperty == null) { return(false); } base.ApplyPropertyValues(plugInBuilderProperty, propertyName); ChoJavaScriptPlugInBuilderProperty o = plugInBuilderProperty as ChoJavaScriptPlugInBuilderProperty; if (o == null) { return(false); } if (propertyName == "Script") { Script = new ChoCDATA(o.Script); } else if (propertyName == "Arguments") { Arguments = new ChoCDATA(o.Arguments); } else if (propertyName == "WorkingDirectory") { WorkingDirectory = o.WorkingDirectory; } else { return(false); } return(true); }
public ChoFileCreatedTimestampPlugInBuilder() { CodeSnippet = new ChoCDATA(@" if (!args[0]) { File.SetCreationTime(args[2], DateTime.Now); } else { return args[1]; } "); Namespaces = "System.IO"; }
private void AddToRecoveryActions(string action, int delayInMins) { if (delayInMins < 0) { delayInMins = 0; } if (Actions == null || Actions.Value.IsNullOrWhiteSpace()) { Actions = new ChoCDATA("{0}/{1}".FormatString(action, delayInMins * 60 * 1000)); } else { Actions = new ChoCDATA("{0}/{1}/{2}".FormatString(Actions.Value, action, delayInMins * 60 * 1000)); } }
protected override bool ApplyPropertyValues(ChoPlugInBuilderProperty plugInBuilderProperty, string propertyName) { if (plugInBuilderProperty == null) { return(false); } base.ApplyPropertyValues(plugInBuilderProperty, propertyName); ChoDotNetAssemblyPlugInBuilderProperty o = plugInBuilderProperty as ChoDotNetAssemblyPlugInBuilderProperty; if (o == null) { return(false); } if (propertyName == "TypeName") { TypeName = o.TypeName; } else if (propertyName == "MethodName") { MethodName = o.MethodName; } else if (propertyName == "IsStaticMethod") { IsStaticMethod = o.IsStaticMethod; } else if (propertyName == "Arguments") { Arguments = new ChoCDATA(o.Arguments); } else { return(false); } return(true); }
protected override bool ApplyPropertyValues(ChoPlugInBuilderProperty plugInBuilderProperty, string propertyName) { if (plugInBuilderProperty == null) { return(false); } if (base.ApplyPropertyValues(plugInBuilderProperty, propertyName)) { return(true); } ChoVBNETCodeSnippetPlugInBuilderProperty o = plugInBuilderProperty as ChoVBNETCodeSnippetPlugInBuilderProperty; if (o == null) { return(false); } if (propertyName == "CodeSnippet") { CodeSnippet = new ChoCDATA(o.CodeSnippet); } else if (propertyName == "Arguments") { Arguments = o.Arguments; } else if (propertyName == "Namespaces") { Namespaces = o.Namespaces; } else { return(false); } return(true); }
public ChoServiceInstallerSettings SetServiceArguments(string args) { ServiceParams = new ChoCDATA(args); return(this); }