Exemple #1
0
 public Task SetContentAsync(HtmlContent htmlContent) =>
 languageServer.SendRequestAsync(
     SetHtmlContentViewRequest.Method,
     new SetHtmlContentViewRequest
 {
     Id          = Id,
     HtmlContent = new HtmlContent()
     {
         BodyContent     = htmlContent.BodyContent,
         JavaScriptPaths = HtmlContentView.GetUriPaths(htmlContent.JavaScriptPaths),
         StyleSheetPaths = HtmlContentView.GetUriPaths(htmlContent.StyleSheetPaths)
     }
 }
     );
Exemple #2
0
        public async Task SetContentAsync(HtmlContent htmlContent)
        {
            HtmlContent validatedContent =
                new HtmlContent()
            {
                BodyContent     = htmlContent.BodyContent,
                JavaScriptPaths = this.GetUriPaths(htmlContent.JavaScriptPaths),
                StyleSheetPaths = this.GetUriPaths(htmlContent.StyleSheetPaths)
            };

            await languageServer.SendRequestAsync(
                SetHtmlContentViewRequest.Method,
                new SetHtmlContentViewRequest
            {
                Id          = this.Id,
                HtmlContent = validatedContent
            }
                );
        }
        public Task SetContentAsync(HtmlContent htmlContent)
        {
            HtmlContent validatedContent =
                new HtmlContent()
            {
                BodyContent     = htmlContent.BodyContent,
                JavaScriptPaths = this.GetUriPaths(htmlContent.JavaScriptPaths),
                StyleSheetPaths = this.GetUriPaths(htmlContent.StyleSheetPaths)
            };

            return
                (this.messageSender.SendRequestAsync(
                     SetHtmlContentViewRequest.Type,
                     new SetHtmlContentViewRequest
            {
                Id = this.Id,
                HtmlContent = validatedContent
            }, true));
        }