public IEnumerable <KeyValuePair <string, object> > GetAllArguments()
        {
            if (StageSpecificArguments != null)
            {
                foreach (var kvp in StageSpecificArguments.ToDictionary())
                {
                    yield return(kvp);
                }
            }

            foreach (IArgument argument in Arguments)
            {
                yield return(new KeyValuePair <string, object>(argument.Name, argument.GetValueAsSystemType()));
            }
        }
        public void IterateAllArguments(Func <string, object, bool> func)
        {
            foreach (var arg in Arguments)
            {
                func(arg.Name, arg.GetValueAsSystemType());
            }

            if (StageSpecificArguments == null)
            {
                return;
            }

            foreach (var arg in StageSpecificArguments.ToDictionary())
            {
                func(arg.Key, arg.Value);
            }
        }
        public IEnumerable <KeyValuePair <string, T> > GetAllArgumentsOfType <T>()
        {
            if (StageSpecificArguments != null)
            {
                foreach (var kvp in StageSpecificArguments.ToDictionary())
                {
                    if (kvp.Value.GetType() == typeof(T))
                    {
                        yield return(new KeyValuePair <string, T>(kvp.Key, (T)kvp.Value));
                    }
                }
            }

            foreach (IArgument argument in Arguments)
            {
                if (argument.GetSystemType() == typeof(T))
                {
                    yield return(new KeyValuePair <string, T>(argument.Name, (T)argument.GetValueAsSystemType()));
                }
            }
        }