Ejemplo n.º 1
0
        public Job([NotNull] Type type, [NotNull] MethodInfo method, [NotNull] string[] arguments)
        {
            if (type == null)
            {
                throw new ArgumentNullException(nameof(type));
            }
            if (method == null)
            {
                throw new ArgumentNullException(nameof(method));
            }
            if (arguments == null)
            {
                throw new ArgumentNullException(nameof(arguments));
            }

            Validate(type, nameof(type), method, nameof(method), arguments.Length, nameof(arguments));

            Type   = type;
            Method = method;
            Args   = InvocationData.DeserializeArguments(method, arguments);
        }
Ejemplo n.º 2
0
        public Job([NotNull] Type type, [NotNull] MethodInfo method, [NotNull] string[] arguments)
        {
            if (type == null)
            {
                throw new ArgumentNullException("type");
            }
            if (method == null)
            {
                throw new ArgumentNullException("method");
            }
            if (arguments == null)
            {
                throw new ArgumentNullException("arguments");
            }

            Validate(type, "type", method, "method", arguments.Length, "arguments");

            Type   = type;
            Method = method;
            Args   = InvocationData.DeserializeArguments(method, arguments);
        }