Ejemplo n.º 1
0
 public DialGroupEntry(string name, string mask, string number, string comment)
 {
     this.name         = DialGroupEntryName.Parse(name);
     this.numberMask   = DialGroupEntryNumberMask.Parse(mask);
     this.dialedNumber = DialGroupEntryDialedNumber.Parse(number);
     this.comment      = DialGroupEntryComment.Parse(comment);
     this.Validate();
 }
Ejemplo n.º 2
0
 public DialGroupEntry(PSObject importedObject)
 {
     try
     {
         this.name         = DialGroupEntryName.Parse((string)importedObject.Properties["Name"].Value);
         this.numberMask   = DialGroupEntryNumberMask.Parse((string)importedObject.Properties["NumberMask"].Value);
         this.dialedNumber = DialGroupEntryDialedNumber.Parse((string)importedObject.Properties["DialedNumber"].Value);
         this.comment      = DialGroupEntryComment.Parse((string)importedObject.Properties["Comment"].Value);
     }
     catch (NullReferenceException)
     {
         throw new FormatException(DataStrings.InvalidDialGroupEntryCsvFormat);
     }
     this.Validate();
 }