public CompletionListSerializationBenchmark()
        {
            var tagHelperFactsService       = new DefaultTagHelperFactsService();
            var completionService           = new DefaultTagHelperCompletionService(tagHelperFactsService);
            var htmlFactsService            = new DefaultHtmlFactsService();
            var tagHelperCompletionProvider = new TagHelperCompletionProvider(completionService, htmlFactsService, tagHelperFactsService);

            var documentContent = "<";
            var queryIndex      = 1;

            CompletionList        = GenerateCompletionList(documentContent, queryIndex, tagHelperCompletionProvider);
            _completionListBuffer = GenerateBuffer(CompletionList);

            Serializer.Instance.JsonSerializer.Converters.Add(TagHelperDescriptorJsonConverter.Instance);
        }
예제 #2
0
        public CompletionListSerializationBenchmark()
        {
            var tagHelperFactsService       = new DefaultTagHelperFactsService();
            var completionService           = new DefaultTagHelperCompletionService(tagHelperFactsService);
            var htmlFactsService            = new DefaultHtmlFactsService();
            var tagHelperCompletionProvider = new TagHelperCompletionProvider(completionService, htmlFactsService, tagHelperFactsService);

            var documentContent = "<";
            var queryIndex      = 1;

            CompletionList        = GenerateCompletionList(documentContent, queryIndex, tagHelperCompletionProvider);
            _completionListBuffer = GenerateBuffer(CompletionList);

            Serializer = new LspSerializer();
            Serializer.RegisterRazorConverters();
        }