public override string GenerateCode() { var s = Name.ToLowerInvariant(); s = "Cmd" + GenerateCodeHelper.ConvertDashesToCamelCase(s); return($"public bool {s} {{ get {{ return _args[\"{Name}\"].IsTrue; }} }}"); }
public override string GenerateCode() { var s = Name.ToLowerInvariant(); s = "Cmd" + GenerateCodeHelper.ConvertDashesToCamelCase(s); return(string.Format("public bool {0} {{ get {{ return _args[\"{1}\"].IsTrue; }} }}", s, Name)); }
public override string GenerateCode() { var s = Name.Replace("<", "").Replace(">", " ").ToLowerInvariant(); s = "Arg" + GenerateCodeHelper.ConvertDashesToCamelCase(s); if (Value != null && Value.IsList) { return(string.Format("public ArrayList {0} {{ get {{ return _args[\"{1}\"].AsList; }} }}", s, Name)); } return(string.Format("public string {0} {{ get {{ return null == _args[\"{1}\"] ? null : _args[\"{1}\"].ToString(); }} }}", s, Name)); }
public override string GenerateCode() { var s = Name.ToLowerInvariant(); s = "Opt" + GenerateCodeHelper.ConvertToPascalCase(s); if (ArgCount == 0) { return($"public bool {s} {{ get {{ return _args[\"{Name}\"].IsTrue; }} }}"); } var defaultValue = Value == null ? "null" : $"\"{Value}\""; return(string.Format("public string {0} {{ get {{ return null == _args[\"{1}\"] ? {2} : _args[\"{1}\"].ToString(); }} }}", s, Name, defaultValue)); }