Ejemplo n.º 1
0
 public DialogServiceInvocation(DialogServiceMethod method)
 {
     Method = method;
     _parameter.Add(Parent           = new ArgumentValue("parent"));
     _parameter.Add(Message          = new StringArgumentValue("message"));
     _parameter.Add(Caption          = new StringArgumentValue("caption"));
     _parameter.Add(Filter           = new StringArgumentValue("filter"));
     _parameter.Add(InitialDirectory = new StringArgumentValue("initialDirectory"));
 }
Ejemplo n.º 2
0
        public virtual bool Matches(ArgumentValue other)
        {
            if (!IsSet)
            {
                return(true);
            }

            return(Object.Equals(Value, other.Value));
        }
Ejemplo n.º 3
0
        public override bool Matches(ArgumentValue other)
        {
            StringArgumentValue actual = (StringArgumentValue)other;

            string expectedStr = (string)Value;
            string actualStr   = (string)actual.Value;

            switch (MatchType)
            {
            case MatchType.None:
                return(true);

            case MatchType.Exact:
                return(String.Equals(expectedStr, actualStr));

            case MatchType.Regex:
                return(Regex.IsMatch(expectedStr, actualStr));

            default:
                throw new NotSupportedException();
            }
        }