Esempio n. 1
0
 public virtual string GetHostName()
 {
     if (!ServerName.IsCorrectType(0, this.mName))
     {
         throw new InvalidOperationException("'name' is not a HostName string");
     }
     return((string)this.mName);
 }
Esempio n. 2
0
 public ServerName(byte nameType, object name)
 {
     if (!ServerName.IsCorrectType(nameType, name))
     {
         throw new ArgumentException("not an instance of the correct type", "name");
     }
     this.mNameType = nameType;
     this.mName     = name;
 }