public static bool GetValue(IArgumentMarshaler argumentMarshaler)
 {
     if (argumentMarshaler != null && argumentMarshaler.GetType() == typeof(BooleanArgumentMarshaler))
         return (argumentMarshaler as BooleanArgumentMarshaler)._value;
     else
         return false;
 }
 internal static string[] GetValue(IArgumentMarshaler argumentMarshaler)
 {
     if (argumentMarshaler != null && argumentMarshaler.GetType() == typeof(StringArrayArgumentMarshaler))
         return (argumentMarshaler as StringArrayArgumentMarshaler)._value;
     else
         return Array.Empty<string>();
 }
 internal static string GetValue(IArgumentMarshaler argumentMarshaler)
 {
     if (argumentMarshaler != null && argumentMarshaler.GetType() == typeof(StringArgumentMarshaler))
         return (argumentMarshaler as StringArgumentMarshaler)._value;
     else
         return string.Empty;
 }
 public static double GetValue(IArgumentMarshaler argumentMarshaler)
 {
     if (argumentMarshaler != null && argumentMarshaler.GetType() == typeof(BooleanArgumentMarshaler))
         return (argumentMarshaler as DoubleArgumentMarshaler)._value;
     else
         return 0.0;
 }
Exemple #5
0
        //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
        //ORIGINAL LINE: private void parseArgumentCharacter(char argChar) throws ArgsException
        private void parseArgumentCharacter(char argChar)
        {
            IArgumentMarshaler m = null;

            if (marshalers.ContainsKey(argChar))
            {
                m = marshalers[argChar];
            }
            if (m == null)
            {
                throw new ArgsException(UNEXPECTED_ARGUMENT, argChar, null);
            }
            else
            {
                argsFound.Add(argChar);
                try
                {
                    m.set(currentArgument);
                }
                catch (ArgsException e)
                {
                    e.ErrorArgumentId = argChar;
                    throw e;
                }
            }
        }
 internal static int GetValue(IArgumentMarshaler argumentMarshaler)
 {
     if (argumentMarshaler != null && argumentMarshaler.GetType() == typeof(IntegerArgumentMarshaler))
         return (argumentMarshaler as IntegerArgumentMarshaler)._value;
     else
         return 0;
 }
Exemple #7
0
        private void ParseArgumentCharacters(string argChar)
        {
            try
            {
                IArgumentMarshaler m = argsSchema.Marshalers[argChar];

                if (m == null)
                {
                    throw new ArgsException(ArgsException.ErrorCodes.UNEXPECTED_ARGUMENT, argChar, null);
                }
                else
                {
                    argsFound.Add(argChar);
                    try
                    {
                        m.Set(currentArgument);
                    }
                    catch (ArgsException ex)
                    {
                        ex.ErrorArgumentId = argChar;
                        throw ex;
                    }
                }
            }
            catch (KeyNotFoundException ex)
            {
                throw new ArgsException(ArgsException.ErrorCodes.UNEXPECTED_ARGUMENT, argChar, null);
            }
        }
 // Token: 0x06015590 RID: 87440 RVA: 0x0056AB20 File Offset: 0x00568D20
 public static float GetValue(IArgumentMarshaler am)
 {
     if (am != null && am is FloatArgumentMarshaler)
     {
         return(((FloatArgumentMarshaler)am)._floatValue);
     }
     return(0f);
 }
Exemple #9
0
 // Token: 0x0601558A RID: 87434 RVA: 0x0056A9E4 File Offset: 0x00568BE4
 public static int GetValue(IArgumentMarshaler am)
 {
     if (am != null && am is Int32ArgumentMarshaler)
     {
         return(((Int32ArgumentMarshaler)am)._int32Value);
     }
     return(0);
 }
Exemple #10
0
 // Token: 0x06015593 RID: 87443 RVA: 0x0056ABC0 File Offset: 0x00568DC0
 public static double GetValue(IArgumentMarshaler am)
 {
     if (am != null && am is DoubleArgumentMarshaler)
     {
         return(((DoubleArgumentMarshaler)am)._doubleValue);
     }
     return(0.0);
 }
Exemple #11
0
 // Token: 0x06015587 RID: 87431 RVA: 0x0056A944 File Offset: 0x00568B44
 public static string GetValue(IArgumentMarshaler am)
 {
     if (am != null && am is StringArgumentMarshaler)
     {
         return(((StringArgumentMarshaler)am)._stringValue);
     }
     return(string.Empty);
 }
 // Token: 0x0601558D RID: 87437 RVA: 0x0056AA80 File Offset: 0x00568C80
 public static long GetValue(IArgumentMarshaler am)
 {
     if (am != null && am is Int64ArgumentMarshaler)
     {
         return(((Int64ArgumentMarshaler)am)._int64Value);
     }
     return(0L);
 }
        public static bool getValue(IArgumentMarshaler am)
        {
            if (am != null && am.GetType() == typeof(BooleanArgumentMarshaler))
            {
                return(((BooleanArgumentMarshaler)am).booleanValue);
            }

            return(false);
        }
Exemple #14
0
        public static int getValue(IArgumentMarshaler am)
        {
            if (am != null && am.GetType() == typeof(IntArgumentMarshaler))
            {
                return(((IntArgumentMarshaler)am).intValue);
            }

            return(0);
        }
Exemple #15
0
        public static string[] getValue(IArgumentMarshaler am)
        {
            if (am != null && am.GetType() == typeof(StringArrayArgumentMarshaler))
            {
                return(((StringArrayArgumentMarshaler)am).stringArrayValue);
            }

            return(new string[] { });
        }
        public static double getValue(IArgumentMarshaler am)
        {
            if (am != null && am.GetType() == typeof(DoubleArgumentMarshaler))
            {
                return(((DoubleArgumentMarshaler)am).doubleValue);
            }

            return(0);
        }
        public static string getValue(IArgumentMarshaler am)
        {
            if (am != null && am.GetType() == typeof(StringArgumentMarshaler))
            {
                return(((StringArgumentMarshaler)am).stringValue);
            }

            return(string.Empty);
        }
Exemple #18
0
 public static int GetValue(IArgumentMarshaler am)
 {
     if (am != null && am is IntegerArgumentMarshaler)
     {
         return(((IntegerArgumentMarshaler)am).intValue);
     }
     else
     {
         return(0);
     }
 }
 public static string getValue(IArgumentMarshaler am)
 {
     if (am != null && am is StringArgumentMarshaler)
     {
         return(((StringArgumentMarshaler)am).stringValue);
     }
     else
     {
         return("");
     }
 }
 public static bool getValue(IArgumentMarshaler am)
 {
     if (am != null && am is BooleanArgumentMarshaler)
     {
         return(((BooleanArgumentMarshaler)am).booleanValue);
     }
     else
     {
         return(false);
     }
 }
 public static string[] getValue(IArgumentMarshaler am)
 {
     if (am != null && am is StringArrayArgumentMarshaler)
     {
         return(((StringArrayArgumentMarshaler)am).strings.ToArray());
     }
     else
     {
         return(new string[0]);
     }
 }
Exemple #22
0
 public static IDictionary <string, string> getValue(IArgumentMarshaler am)
 {
     if (am != null && am is MapArgumentMarshaler)
     {
         return(((MapArgumentMarshaler)am).map);
     }
     else
     {
         return(new Dictionary <string, string>());
     }
 }
 public static string GetValue(IArgumentMarshaler am)
 {
     //I know we have cast pattern, but the book didn't use it,am either
     if (am != null && am is StringArgumentMarshaler)
     {
         return((am as StringArgumentMarshaler).stringValue);
     }
     else
     {
         return("");
     }
 }
        public static string GetValue(IArgumentMarshaler marshaler)
        {
            if (marshaler is null)
            {
                throw new ArgumentNullException(nameof(marshaler));
            }

            if (marshaler is StringArgumentMarshaler)
            {
                return(((StringArgumentMarshaler)marshaler).value);
            }

            return("");
        }
        public static bool GetValue(IArgumentMarshaler marshaler)
        {
            if (marshaler is null)
            {
                throw new ArgumentNullException(nameof(marshaler));
            }

            if (marshaler is BoolArgumentMarshaler)
            {
                return(((BoolArgumentMarshaler)marshaler).value);
            }

            return(false);
        }
Exemple #26
0
 // Token: 0x06015599 RID: 87449 RVA: 0x0056ADC0 File Offset: 0x00568FC0
 private void _ParseArguments(string[] argsArray)
 {
     for (int i = 0; i < argsArray.Length; i++)
     {
         IArgumentMarshaler argumentMarshaler = this._marshalers[i.ToString()];
         if (argumentMarshaler == null)
         {
             throw new ArgsException(ArgsException.ErrorCode.UNEXPECTED_ARGUMENT, i.ToString(), null);
         }
         try
         {
             argumentMarshaler.Set(argsArray[i]);
         }
         catch (ArgsException ex)
         {
             ex.ErrorArgumentId = i.ToString();
             throw ex;
         }
     }
 }
Exemple #27
0
        private void parseArgumentCharacter(char argChar)
        {
            IArgumentMarshaler m = marshalers.GetValueOrDefault(argChar);

            if (m == null)
            {
                throw new ArgsException(ErrorCode.UNEXPECTED_ARGUMENT, argChar, null);
            }
            else
            {
                argsFound.Add(argChar);
                try
                {
                    m.set(currentArgument);
                }
                catch (ArgsException e)
                {
                    e.setErrorArgumentId(argChar);
                    throw e;
                }
            }
        }
Exemple #28
0
        private void ParseArgumentCharacter(char argsChar)
        {
            IArgumentMarshaler m = marshalers[argsChar];

            if (m == null)
            {
                throw new ArgumentException();
            }
            else
            {
                argsFound.Add(argsChar);
                try
                {
                    m.Set(currentArgument.GetEnumerator());
                }
                catch (ArgsException e)
                {
                    e.SetErrorArgumentId(argsChar);
                    throw e;
                }
            }
        }
Exemple #29
0
 public static string[] GetValue(IArgumentMarshaler argumentMarshaler)
 {
     return(new[] { "" });
 }
 internal static int GetValue(IArgumentMarshaler argumentMarshaler)
 {
     return(argumentMarshaler is IntegerArgumentMarshaler am
         ? am.integerValue
         : default(int));
 }
 internal static double GetValue(IArgumentMarshaler argumentMarshaler)
 {
     return(argumentMarshaler is DoubleArgumentMarshaler am
         ? am.doubleValue
         : default(double));
 }
 // Token: 0x06015584 RID: 87428 RVA: 0x0056A904 File Offset: 0x00568B04
 public static bool GetValue(IArgumentMarshaler am)
 {
     return(am != null && am is BooleanArgumentMarshaler && ((BooleanArgumentMarshaler)am)._booleanValue);
 }
Exemple #33
0
 internal static bool GetValue(IArgumentMarshaler argumentMarshaler)
 {
     return(argumentMarshaler is BooleanArgumentMarshaler am
         ? am.boolValue
         : false);
 }
Exemple #34
0
 internal static string GetValue(IArgumentMarshaler argumentMarshaler)
 {
     return(argumentMarshaler is StringArgumentMarshaler am
         ? am.stringValue
         : string.Empty);
 }
 internal static string[] GetValue(IArgumentMarshaler argumentMarshaler)
 {
     return(argumentMarshaler is StringArrayArgumentMarshaler am
         ? am.stringArrayArgument.ToArray()
         : new string[0]);
 }