BoxKite.Twitter.Console.ConsoleOutput.PrintError C# (CSharp) 메소드

PrintError() 공개 정적인 메소드

public static PrintError ( String err, ConsoleColor fgColour = ConsoleColor.Red, ConsoleColor bgColour = ConsoleColor.Black ) : void
err String
fgColour ConsoleColor
bgColour ConsoleColor
리턴 void
        public static void PrintError(String err, ConsoleColor fgColour = ConsoleColor.Red,
            ConsoleColor bgColour = ConsoleColor.Black)
        {
            PrintMessage(err, ConsoleColor.Red);
        }

Usage Example

        public async Task <bool> DoApiTest(ITwitterSession session, List <int> testSeq)
        {
            var successStatus = true;

            try
            {
                // 1
                if (testSeq.Contains(1))
                {
                    ConsoleOutput.PrintMessage("ApiManagement\\GetCurrentAPIStatus", ConsoleColor.Gray);
                    var currentapi = await session.GetCurrentApiStatus();

                    if (currentapi.OK)
                    {
                        foreach (var x in currentapi.APIRateStatuses)
                        {
                            ConsoleOutput.PrintMessage(
                                String.Format("API on: {0} Calls: {1}/{2} Resets: {3}", x.Key, x.Value.Remaining, x.Value.Limit, x.Value.ResetTime));
                        }
                    }
                    else
                    {
                        successStatus = false;
                    }
                }
            }
            catch (Exception e)
            {
                ConsoleOutput.PrintError(e.ToString());
                return(false);
            }
            return(successStatus);
        }
All Usage Examples Of BoxKite.Twitter.Console.ConsoleOutput::PrintError