public static void displayMethod(EnumMethod meth)
        {
            string toDisplay = string.Empty;
            switch(meth){
                case EnumMethod.GET:
                    toDisplay = "Utilisation de la méthode GET : récupération du contenu en cours";
                    break;
                case EnumMethod.TEST:
                    toDisplay = "Utilisation de la méthode TEST : tests de récupération du contenu en cours";
                    break;
            }

            Console.WriteLine("{0}\n\n",toDisplay);
        }
Example #2
0
        private IEnumerable <EnumMethod> TransferMethods(List <ArticleItemYaml> articleItemYamls)
        {
            if (articleItemYamls == null)
            {
                return(null);
            }

            var methods = articleItemYamls.Where(item => item.Type == MemberType.Method)?.ToArray();

            if (methods == null)
            {
                return(null);
            }

            List <EnumMethod> enumMethods = new List <EnumMethod>();

            foreach (var method in methods)
            {
                var enumMethod = new EnumMethod();
                enumMethod.FullName     = method.FullName;
                enumMethod.Name         = method.Name;
                enumMethod.NameWithType = method.NameWithType;
                enumMethod.Overridden   = method.Overridden;
                enumMethod.Parameters   = TransferParameters(method.Syntax);
                enumMethod.Summary      = method.Summary;
                enumMethod.Syntax       = TransferSyntax(method.Syntax);
                enumMethod.Exceptions   = TransferExceptions(method.Exceptions);
                enumMethod.Returns      = TransferReturns(method.Syntax);
                enumMethod.Uid          = method.Uid;
                enumMethods.Add(enumMethod);
            }

            if (enumMethods.Count == 0)
            {
                return(null);
            }

            return(enumMethods);
        }
Example #3
0
        //----------------------------------------------------------------------------------------------------------------
        /// <summary>
        /// Debugs the specified message.
        /// </summary>
        /// <param name="message">The message.</param>
        public void Debug(EnumMethod enumMethod)
        {
            StackTrace st          = new StackTrace();
            string     whoCalledMe = st.GetFrame(1).GetMethod().Name;
            string     position    = string.Empty;

            if (enumMethod != EnumMethod.NONE)
            {
                if (enumMethod == EnumMethod.START)
                {
                    position = "--> Start";
                }
                else if (enumMethod == EnumMethod.END)
                {
                    position = "--> End";
                }
            }

            if (_loggerInfo.Level == EnumLogger.DEBUG)
            {
                string log = ("Debug :" + DateTime.Now.ToShortDateString() + "_" + DateTime.Now.ToShortDateString() + "-->" + whoCalledMe + position);
                WriteFile("\r\n" + log);
            }
        }
        //----------------------------------------------------------------------------------------------------------------
        /// <summary>
        /// Debugs the specified message.
        /// </summary>
        /// <param name="message">The message.</param>
        public void Debug(EnumMethod enumMethod)
        {
            StackTrace st = new StackTrace();
            string whoCalledMe = st.GetFrame(1).GetMethod().Name;
            string position = string.Empty;
            if (enumMethod != EnumMethod.NONE)
            {
                if (enumMethod == EnumMethod.START)
                {
                    position = "--> Start";
                }
                else if (enumMethod == EnumMethod.END)
                {
                    position = "--> End";
                }
            }

            if (_loggerInfo.Level == EnumLogger.DEBUG)
            {

                string log = ("Debug :" + DateTime.Now.ToShortDateString() + "_" + DateTime.Now.ToShortDateString() + "-->" + whoCalledMe  + position);
                WriteFile("\r\n" + log);
            }
        }
Example #5
0
 static JDFAutoInsertingParams()
 {
     atrInfoTable[0]  = new AtrInfoTable(AttributeName.INSERTLOCATION, 0x22222222, AttributeInfo.EnumAttributeType.enumeration, EnumInsertLocation.getEnum(0), null);
     atrInfoTable[1]  = new AtrInfoTable(AttributeName.METHOD, 0x33333333, AttributeInfo.EnumAttributeType.enumeration, EnumMethod.getEnum(0), "BlowIn");
     atrInfoTable[2]  = new AtrInfoTable(AttributeName.SHEETOFFSET, 0x44444443, AttributeInfo.EnumAttributeType.XYPair, null, null);
     atrInfoTable[3]  = new AtrInfoTable(AttributeName.FINISHEDPAGE, 0x33333311, AttributeInfo.EnumAttributeType.integer, null, null);
     elemInfoTable[0] = new ElemInfoTable(ElementName.GLUELINE, 0x33333333);
 }
Example #6
0
 ///
 ///          <summary> * (9) get attribute Method </summary>
 ///          * <returns> the value of the attribute </returns>
 ///
 public virtual EnumMethod getMethod()
 {
     return(EnumMethod.getEnum(getAttribute(AttributeName.METHOD, null, "BlowIn")));
 }
Example #7
0
 //         ---------------------------------------------------------------------
 //        Methods for Attribute Method
 //        ---------------------------------------------------------------------
 ///
 ///          <summary> * (5) set attribute Method </summary>
 ///          * <param name="enumVar">: the enumVar to set the attribute to </param>
 ///
 public virtual void setMethod(EnumMethod enumVar)
 {
     setAttribute(AttributeName.METHOD, enumVar == null ? null : enumVar.getName(), null);
 }
 public ParserException(string message, EnumMethod method) : base(message)
 {
     Method = method;
 }