예제 #1
0
 public AdName(string prefix, string value, bool isEscaped)
 {
     if (value == null)
     {
         throw new ArgumentNullException("value");
     }
     if (string.IsNullOrEmpty(value))
     {
         throw new ArgumentException(DirectoryStrings.ExEmptyStringArgumentException("value"), "value");
     }
     if (prefix == null)
     {
         throw new ArgumentNullException("prefix");
     }
     if (string.IsNullOrEmpty(prefix))
     {
         throw new ArgumentException(DirectoryStrings.ExEmptyStringArgumentException("prefix"), "prefix");
     }
     this.prefix = AdName.PrefixIntern(prefix);
     if (!isEscaped)
     {
         this.escapedName = AdName.Escape(value);
         return;
     }
     this.escapedName = AdName.Format(value);
 }
예제 #2
0
 private AdName(string prefix, string escapedName, string unescapedName)
 {
     this.prefix        = AdName.PrefixIntern(prefix);
     this.escapedName   = escapedName;
     this.unescapedName = unescapedName;
 }