Example #1
0
 protected override void InternalValidate()
 {
     if (this.Type == AttachmentType.FileName)
     {
         try
         {
             string text;
             Regex  regex;
             string text2;
             AttachmentFilterEntrySpecification.ParseFileSpec(this.Name, out text, out regex, out text2);
         }
         catch (InvalidDataException exception)
         {
             base.WriteError(exception, ErrorCategory.InvalidArgument, null);
         }
     }
 }
        private void WriteOutput(string attachmentName)
        {
            AttachmentFilterEntrySpecification attachmentFilterEntrySpecification = AttachmentFilterEntrySpecification.Parse(attachmentName);

            if (attachmentFilterEntrySpecification.Type == AttachmentType.FileName)
            {
                try
                {
                    string text;
                    Regex  regex;
                    string text2;
                    AttachmentFilterEntrySpecification.ParseFileSpec(attachmentFilterEntrySpecification.Name, out text, out regex, out text2);
                }
                catch (InvalidDataException ex)
                {
                    base.WriteWarning(ex.Message);
                }
            }
            this.WriteResult(attachmentFilterEntrySpecification);
        }