示例#1
0
        public ActionResult DrawStackTraceArt(string stackTraceArtClassWrapperTypeFullName)
        {
            var stackTraceArtClassWrapperType = StackTraceArtClassWrapperHelper
                                                .FindStackTraceArtClassWrappersInDirectory(new DirectoryInfo(Server.MapPath("~/bin")))
                                                .Single(type => type.FullName == stackTraceArtClassWrapperTypeFullName);

            StackTraceArtClassWrapperHelper.Paint(stackTraceArtClassWrapperType);
            return(null); // This will never happen because the above method throws the Stack Trace Art exception.
        }
示例#2
0
        static void Main()
        {
            var stackTraceArtClassWrappers = StackTraceArtClassWrapperHelper.FindStackTraceArtClassWrappersInDirectory(new DirectoryInfo(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location) ?? string.Empty /* To silent ReSharper.*/));

            for (int i = 0; i < stackTraceArtClassWrappers.Length; i++)
            {
                Console.WriteLine("{0}. {1}", i + 1, stackTraceArtClassWrappers[i].Name);
            }

            Console.Write("Select art: ");

            int artIndex = int.Parse(Console.ReadLine() ?? "1") - 1;

            StackTraceArtClassWrapperHelper.Paint(stackTraceArtClassWrappers[artIndex]);
        }