static void PrintError(Exception ex) { FaultException <ConfigStoreFault> fault = ex as FaultException <ConfigStoreFault>; if (fault != null) { CommandUI.PrintBold("CONFIGSTOREERROR={0}", fault.Detail.Error); System.Console.WriteLine(fault.Detail.Message); CommandUI.PrintSectionBreak(); System.Console.WriteLine(fault.ToString()); } else { System.Console.WriteLine(ex.Message); } }
bool VerifyIsUnique(DnsRecord record, bool details) { DnsRecord existing = this.Find(record); if (existing != null) { CommandUI.PrintBold("Record already exists"); if (details) { Print(existing); } else { CommandUI.Print("RecordID", existing.ID); } return(false); } return(true); }