예제 #1
0
        //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
        //ORIGINAL LINE: private void parseSchemaElement(String element) throws ArgsException
        private void parseSchemaElement(string element)
        {
            char   elementId   = element[0];
            string elementTail = element.Substring(1);

            validateSchemaElementId(elementId);
            if (elementTail.Length == 0)
            {
                marshalers[elementId] = new BooleanArgumentMarshaler();
            }
            else if (elementTail.Equals("*"))
            {
                marshalers[elementId] = new StringArgumentMarshaler();
            }
            else if (elementTail.Equals("#"))
            {
                marshalers[elementId] = new IntegerArgumentMarshaler();
            }
            else if (elementTail.Equals("##"))
            {
                marshalers[elementId] = new DoubleArgumentMarshaler();
            }
            else if (elementTail.Equals("[*]"))
            {
                marshalers[elementId] = new StringArrayArgumentMarshaler();
            }
            else if (elementTail.Equals("&"))
            {
                marshalers[elementId] = new MapArgumentMarshaler();
            }
            else
            {
                throw new ArgsException(INVALID_ARGUMENT_FORMAT, elementId, elementTail);
            }
        }
예제 #2
0
 public virtual double getDouble(char arg)
 {
     return(DoubleArgumentMarshaler.getValue(marshalers[arg]));
 }