예제 #1
0
        /// <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;
        }
예제 #2
0
        /// <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;
        }
예제 #3
0
        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());
            }
        }