예제 #1
0
        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);
            }
        }
예제 #2
0
        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);
        }