예제 #1
0
 public MarkdownSettings(
     string boldDelimiter              = "**",
     string italicDelimiter            = "*",
     string strikethroughDelimiter     = "~~",
     string listItemStart              = "* ",
     string tableDelimiter             = "|",
     string codeDelimiter              = "`",
     string codeBlockChars             = "```",
     string horizontalRule             = "___",
     EmptyLineOptions headerOptions    = EmptyLineOptions.EmptyLineBeforeAndAfter,
     EmptyLineOptions codeBlockOptions = EmptyLineOptions.EmptyLineBeforeAndAfter,
     bool useTablePadding              = true,
     bool useTableOuterPipe            = true,
     TableFormatting tableFormatting   = TableFormatting.Header,
     bool allowLinkWithoutUrl          = true,
     string indentChars = "  ",
     Func <char, bool> shouldBeEscaped = null)
 {
     BoldDelimiter          = boldDelimiter;
     ItalicDelimiter        = italicDelimiter;
     StrikethroughDelimiter = strikethroughDelimiter;
     ListItemStart          = listItemStart;
     TableDelimiter         = tableDelimiter;
     CodeDelimiter          = codeDelimiter;
     CodeBlockChars         = codeBlockChars;
     HorizontalRule         = horizontalRule;
     HeaderOptions          = headerOptions;
     CodeBlockOptions       = codeBlockOptions;
     TableFormatting        = tableFormatting;
     UseTablePadding        = useTablePadding;
     UseTableOuterPipe      = useTableOuterPipe;
     IndentChars            = indentChars;
     AllowLinkWithoutUrl    = allowLinkWithoutUrl;
     ShouldBeEscaped        = shouldBeEscaped ?? MarkdownEscaper.ShouldBeEscaped;
 }
        public override void Dispose()
        {
            base.Dispose();

            DisposeTextBlock(TextBlock1);
            TextBlock1 = null;
            DisposeTextBlock(TextBlock2);
            TextBlock2 = null;
            DisposeTextBlock(TextBlock3);
            TextBlock3 = null;
            DisposeTextBlock(WinRTText1);
            WinRTText1 = null;
            DisposeTextBlock(WinRTText2);
            WinRTText2 = null;
            DisposeTextBlock(text1);
            text1 = null;
            DisposeTextBlock(text2);
            text2 = null;
            DisposeTextBlock(text3);
            text3 = null;
            DisposeTextBlock(text4);
            text4 = null;
            DisposeTextBlock(saveas);
            saveas = null;

            Button1.Click -= Button_Click_1;
            DisposeButton(Button1);
            Button1 = null;

            DisposeRadioButton(rdDoc);
            rdDoc = null;
            DisposeRadioButton(rdDocx);
            rdDocx = null;

            stackPnlOptions.ClearValue(StackPanel.OrientationProperty);
            stackPnlOptions.ClearValue(StackPanel.HorizontalAlignmentProperty);
            stackPnlOptions = null;

            TableFormatting.ClearValue(Grid.BackgroundProperty);
            TableFormatting.ClearValue(Grid.PaddingProperty);
            TableFormatting.Children.Clear();
            TableFormatting.ColumnDefinitions.Clear();
            TableFormatting.RowDefinitions.Clear();
            TableFormatting = null;
        }
예제 #3
0
        static void Main(string[] args)
        {
            if (args.Length != 2)
            {
                PrintHelp();
                return;
            }

            var data1       = DataLoaderFactory.GetLoader(args[0]).LoadBenchmarks(args[0]);
            var data2       = DataLoaderFactory.GetLoader(args[1]).LoadBenchmarks(args[1]);
            var tableFormat = new TableFormatting();
            var comparers   = new List <BaseValueComparer>
            {
                new MeanComparer(),
                new AllocatedComparer(),
                new Gen0Comparer(),
                new Gen1Comparer(),
                new Gen2Comparer(),
                new CompletedWorkItemsComparer(),
                new LockContentionsComparer(),
                new BranchInstructionsComparer(),
                new BranchMispredictionsComparer(),
                new CacheMissesComparer(),
                new NativeAllocatedComparer(),
                new NativeLeakComparer()
            };

            foreach (var comparer in comparers)
            {
                var comparedData = comparer.Compare(data1, data2);

                if (comparedData.Length > 0)
                {
                    ConsoleTable.From(comparedData).Write(tableFormat);
                    Console.WriteLine();
                }
            }
        }