コード例 #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"));
 }
コード例 #2
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();
            }
        }