/// <summary> /// Constructeur normal. /// </summary> /// <param name="cmd">Commande à effectuer.</param> /// <param name="args">Arguments pour la commande à effectuer.</param> public Commande(CommandeEnum cmd, string[] args) { logClient = new LogService.LogClient(); this.cmd = cmd; this.args = args; }
/// <summary> /// Constructeur normal. /// </summary> /// <param name="cmd">Commande à effectuer.</param> /// <param name="args">Arguments pour la commande à effectuer.</param> public Commande(CommandeEnum cmd, string[] args) { velibClient = new VelibSOAP.VelibOperationsClient(); this.cmd = cmd; this.args = args; }
private static string GetEnumDescription(CommandeEnum value) { FieldInfo fi = value.GetType().GetField(value.ToString()); DescriptionAttribute[] attributes = (DescriptionAttribute[])fi.GetCustomAttributes(typeof(DescriptionAttribute), false); if (attributes != null && attributes.Length > 0) { return(attributes[0].Description); } else { return(value.ToString()); } }