This commit is contained in:
Florian Rappl 2019-05-15 02:07:59 +02:00
Родитель 45d3f7a03b
Коммит e8e47d5b14
26 изменённых файлов: 640 добавлений и 615 удалений

Просмотреть файл

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Samples</RootNamespace>
<AssemblyName>Samples</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
@ -17,6 +17,7 @@
<RestorePackages>true</RestorePackages>
<NuGetPackageImportStamp>65879974</NuGetPackageImportStamp>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@ -42,21 +43,23 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Accessibility" />
<Reference Include="AngleSharp, Version=0.9.9.0, Culture=neutral, PublicKeyToken=e83494dcdc6d31ea, processorArchitecture=MSIL">
<HintPath>..\packages\AngleSharp.0.9.9\lib\net45\AngleSharp.dll</HintPath>
<Private>True</Private>
<Reference Include="AngleSharp, Version=0.12.1.0, Culture=neutral, PublicKeyToken=e83494dcdc6d31ea, processorArchitecture=MSIL">
<HintPath>..\packages\AngleSharp.0.12.1\lib\net46\AngleSharp.dll</HintPath>
</Reference>
<Reference Include="AngleSharp.Io, Version=0.3.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\AngleSharp.Io.0.3.2\lib\net45\AngleSharp.Io.dll</HintPath>
<Private>True</Private>
<Reference Include="AngleSharp.Css, Version=0.12.1.0, Culture=neutral, PublicKeyToken=e83494dcdc6d31ea, processorArchitecture=MSIL">
<HintPath>..\packages\AngleSharp.Css.0.12.1\lib\net46\AngleSharp.Css.dll</HintPath>
</Reference>
<Reference Include="AngleSharp.Scripting.JavaScript, Version=0.5.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\AngleSharp.Scripting.JavaScript.0.5.0\lib\portable-windows8+net45+windowsphone8+wpa+monoandroid+monotouch\AngleSharp.Scripting.JavaScript.dll</HintPath>
<Private>True</Private>
<Reference Include="AngleSharp.Io, Version=0.12.1.0, Culture=neutral, PublicKeyToken=e83494dcdc6d31ea, processorArchitecture=MSIL">
<HintPath>..\packages\AngleSharp.Io.0.12.1\lib\netstandard2.0\AngleSharp.Io.dll</HintPath>
</Reference>
<Reference Include="Jint, Version=2.9.1.0, Culture=neutral, PublicKeyToken=2e92ba9c8d81157f, processorArchitecture=MSIL">
<HintPath>..\packages\Jint.2.9.1\lib\portable-net40+sl50+win+WindowsPhoneApp81+wp80\Jint.dll</HintPath>
<Private>True</Private>
<Reference Include="AngleSharp.Js, Version=0.12.1.0, Culture=neutral, PublicKeyToken=e83494dcdc6d31ea, processorArchitecture=MSIL">
<HintPath>..\packages\AngleSharp.Js.0.12.1\lib\net46\AngleSharp.Js.dll</HintPath>
</Reference>
<Reference Include="AngleSharp.Xml, Version=0.12.1.0, Culture=neutral, PublicKeyToken=e83494dcdc6d31ea, processorArchitecture=MSIL">
<HintPath>..\packages\AngleSharp.Xml.0.12.1\lib\netstandard1.3\AngleSharp.Xml.dll</HintPath>
</Reference>
<Reference Include="jint, Version=2.10.4.0, Culture=neutral, PublicKeyToken=2e92ba9c8d81157f, processorArchitecture=MSIL">
<HintPath>..\packages\jint.2.10.4\lib\net45\jint.dll</HintPath>
</Reference>
<Reference Include="MahApps.Metro, Version=1.2.4.0, Culture=neutral, PublicKeyToken=f4fb5a3c4d1e5b4f, processorArchitecture=MSIL">
<HintPath>..\packages\MahApps.Metro.1.2.4.0\lib\net45\MahApps.Metro.dll</HintPath>
@ -91,9 +94,16 @@
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Diagnostics.Contracts, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
<Reference Include="System.Net" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Printing" />
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.0\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Text.Encoding.CodePages, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Text.Encoding.CodePages.4.5.0\lib\net461\System.Text.Encoding.CodePages.dll</HintPath>
</Reference>
<Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\MahApps.Metro.1.2.4.0\lib\net45\System.Windows.Interactivity.dll</HintPath>
<Private>True</Private>

Просмотреть файл

@ -6,7 +6,7 @@
</sectionGroup>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
<userSettings>
<Samples.Properties.Settings>
@ -33,6 +33,10 @@
<assemblyIdentity name="System.Windows.Interactivity" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.5.0.0" newVersion="4.5.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Text.Encoding.CodePages" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

Просмотреть файл

@ -1,15 +1,15 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18033
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Samples.Properties
{
namespace Samples.Properties {
using System;
/// <summary>
@ -19,31 +19,26 @@ namespace Samples.Properties
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Samples.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
@ -56,14 +51,11 @@ namespace Samples.Properties
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set
{
set {
resourceCulture = value;
}
}

Просмотреть файл

@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18046
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@ -12,7 +12,7 @@ namespace Samples.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));

Просмотреть файл

@ -1,6 +1,6 @@
namespace Samples.ViewModels
{
using AngleSharp.Dom.Css;
using AngleSharp.Css.Dom;
using System;
using System.Collections.ObjectModel;

Просмотреть файл

@ -1,7 +1,10 @@
namespace Samples.ViewModels
{
using AngleSharp;
using AngleSharp.Css.Dom.Events;
using AngleSharp.Dom;
using AngleSharp.Dom.Events;
using AngleSharp.Html.Dom.Events;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
@ -34,15 +37,13 @@
private void Register<T>(Action<T> listener)
where T : Event
{
_context.ParseError += (obj, ev) =>
_context.AddEventListener(EventNames.Error, (obj, ev) =>
{
var data = ev as T;
if (data != null)
if (ev is T data)
{
listener.Invoke(data);
}
};
});
}
public void Reset()

Просмотреть файл

@ -1,6 +1,7 @@
namespace Samples.ViewModels
{
using AngleSharp;
using AngleSharp.Io;
using System;
using System.Threading;
using System.Threading.Tasks;
@ -38,11 +39,15 @@
public MainViewModel()
{
var config = Configuration.Default.WithCss().WithRequesters(setup =>
{
setup.IsNavigationEnabled = true;
setup.IsResourceLoadingEnabled = true;
}).WithJavaScript();
var config = Configuration.Default
.WithCss()
.WithCookies()
.WithJs()
.WithDefaultLoader(new LoaderOptions
{
IsNavigationDisabled = true,
IsResourceLoadingEnabled = true,
});
_context = BrowsingContext.New(config);
_profiler = new ProfilerViewModel(_context);
_errors = new ErrorsViewModel(_context);

Просмотреть файл

@ -1,7 +1,10 @@
namespace Samples.ViewModels
{
using AngleSharp;
using AngleSharp.Css.Dom.Events;
using AngleSharp.Dom;
using AngleSharp.Dom.Events;
using AngleSharp.Html.Dom.Events;
using OxyPlot;
using OxyPlot.Axes;
using OxyPlot.Series;
@ -22,10 +25,10 @@
_tracker = new Dictionary<Object, TimeSpan>();
_context = context;
_model = CreateModel();
_context.Parsing += TrackParsing;
_context.Parsed += TrackParsed;
_context.Requesting += TrackRequesting;
_context.Requested += TrackRequested;
_context.AddEventListener(EventNames.Parsing, TrackParsing);
_context.AddEventListener(EventNames.Parsed, TrackParsed);
_context.AddEventListener(EventNames.Requesting, TrackRequesting);
_context.AddEventListener(EventNames.Requested, TrackRequested);
}
private static PlotModel CreateModel()
@ -91,14 +94,11 @@
private void TrackParsing(Object sender, Event ev)
{
var html = ev as HtmlParseEvent;
var css = ev as CssParseEvent;
if (html != null)
if (ev is HtmlParseEvent html)
{
_tracker.Add(html.Document, _time.Elapsed);
}
else if (css != null)
else if (ev is CssParseEvent css)
{
_tracker.Add(css.StyleSheet, _time.Elapsed);
}
@ -106,20 +106,16 @@
private void TrackParsed(Object sender, Event ev)
{
var html = ev as HtmlParseEvent;
var css = ev as CssParseEvent;
var start = default(TimeSpan);
if (html != null && _tracker.TryGetValue(html.Document, out start))
if (ev is HtmlParseEvent html && _tracker.TryGetValue(html.Document, out var startHtml))
{
var document = html.Document;
AddItem("Parse HTML " + document.Url, OxyColors.Orange, start, _time.Elapsed);
AddItem("Parse HTML " + document.Url, OxyColors.Orange, startHtml, _time.Elapsed);
_tracker.Remove(document);
}
else if (css != null && _tracker.TryGetValue(css.StyleSheet, out start))
else if (ev is CssParseEvent css && _tracker.TryGetValue(css.StyleSheet, out var startCss))
{
var styleSheet = css.StyleSheet;
AddItem("Parse CSS " + styleSheet.Href, OxyColors.Violet, start, _time.Elapsed);
AddItem("Parse CSS " + styleSheet.Href, OxyColors.Violet, startCss, _time.Elapsed);
_tracker.Remove(styleSheet);
}
}

Просмотреть файл

@ -1,7 +1,7 @@
namespace Samples.ViewModels
{
using AngleSharp.Dom;
using AngleSharp.Extensions;
using AngleSharp.Js;
using Jint.Runtime;
using System;
using System.Collections.ObjectModel;

Просмотреть файл

@ -1,7 +1,8 @@
namespace Samples.ViewModels
{
using AngleSharp.Css.Dom;
using AngleSharp.Css.Dom.Events;
using AngleSharp.Dom;
using AngleSharp.Dom.Css;
using AngleSharp.Dom.Events;
using System;
using System.Collections.ObjectModel;
@ -37,9 +38,8 @@
_selected = value;
RaisePropertyChanged();
_tree.Clear();
var sheet = _selected as ICssStyleSheet;
if (sheet != null)
if (_selected is ICssStyleSheet sheet)
{
for (int i = 0; i < sheet.Rules.Length; i++)
{
@ -57,7 +57,7 @@
{
if (_document != null)
{
_document.Context.Parsed -= ParseEnded;
_document.Context.RemoveEventListener(EventNames.Parsed, ParseEnded);
}
_document = value;
@ -68,16 +68,14 @@
_source.Add(sheet);
}
_document.Context.Parsed += ParseEnded;
_document.Context.AddEventListener(EventNames.Parsed, ParseEnded);
Selected = null;
}
}
private void ParseEnded(Object sender, Event ev)
{
var data = ev as CssParseEvent;
if (data != null)
if (ev is CssParseEvent data)
{
App.Current.Dispatcher.Invoke(() => _source.Add(data.StyleSheet));
}

Просмотреть файл

@ -104,7 +104,7 @@
if (data.Length == 0)
return null;
return new TreeNodeViewModel { Value = HtmlMarkupFormatter.Instance.Text(text.Data), Foreground = Brushes.SteelBlue };
return new TreeNodeViewModel { Value = HtmlMarkupFormatter.Instance.Text(text), Foreground = Brushes.SteelBlue };
}
private static TreeNodeViewModel Create(IElement node)

Просмотреть файл

@ -1,12 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="AngleSharp" version="0.9.9" targetFramework="net45" />
<package id="AngleSharp.Io" version="0.3.2" targetFramework="net45" />
<package id="AngleSharp.Scripting.JavaScript" version="0.5.0" targetFramework="net45" />
<package id="Jint" version="2.9.1" targetFramework="net45" />
<package id="AngleSharp" version="0.12.1" targetFramework="net461" />
<package id="AngleSharp.Css" version="0.12.1" targetFramework="net461" />
<package id="AngleSharp.Io" version="0.12.1" targetFramework="net461" />
<package id="AngleSharp.Js" version="0.12.1" targetFramework="net461" />
<package id="AngleSharp.Xml" version="0.12.1" targetFramework="net461" />
<package id="jint" version="2.10.4" targetFramework="net461" />
<package id="MahApps.Metro" version="1.2.4.0" targetFramework="net45" />
<package id="OxyPlot.Core" version="2015.1.943-alpha" targetFramework="net45" />
<package id="OxyPlot.Wpf" version="2015.1.943-alpha" targetFramework="net45" />
<package id="Simple.Wpf.Terminal" version="1.35.0.0" targetFramework="net45" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.0" targetFramework="net461" />
<package id="System.Text.Encoding.CodePages" version="4.5.0" targetFramework="net461" />
<package id="System.Windows.Interactivity.WPF" version="2.0.20525" targetFramework="net45" />
</packages>

Просмотреть файл

@ -9,10 +9,11 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>AngleSharp.Samples.Demos</RootNamespace>
<AssemblyName>AngleSharp.Samples.Demos</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<NuGetPackageImportStamp>ba6035cc</NuGetPackageImportStamp>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@ -34,21 +35,28 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="AngleSharp, Version=0.9.9.0, Culture=neutral, PublicKeyToken=e83494dcdc6d31ea, processorArchitecture=MSIL">
<HintPath>..\packages\AngleSharp.0.9.9\lib\net45\AngleSharp.dll</HintPath>
<Private>True</Private>
<Reference Include="AngleSharp, Version=0.12.1.0, Culture=neutral, PublicKeyToken=e83494dcdc6d31ea, processorArchitecture=MSIL">
<HintPath>..\packages\AngleSharp.0.12.1\lib\net46\AngleSharp.dll</HintPath>
</Reference>
<Reference Include="AngleSharp.Scripting.JavaScript, Version=0.5.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\AngleSharp.Scripting.JavaScript.0.5.0\lib\portable-windows8+net45+windowsphone8+wpa+monoandroid+monotouch\AngleSharp.Scripting.JavaScript.dll</HintPath>
<Private>True</Private>
<Reference Include="AngleSharp.Css, Version=0.12.1.0, Culture=neutral, PublicKeyToken=e83494dcdc6d31ea, processorArchitecture=MSIL">
<HintPath>..\packages\AngleSharp.Css.0.12.1\lib\net46\AngleSharp.Css.dll</HintPath>
</Reference>
<Reference Include="Jint, Version=2.9.1.0, Culture=neutral, PublicKeyToken=2e92ba9c8d81157f, processorArchitecture=MSIL">
<HintPath>..\packages\Jint.2.9.1\lib\portable-net40+sl50+win+WindowsPhoneApp81+wp80\Jint.dll</HintPath>
<Private>True</Private>
<Reference Include="AngleSharp.Js, Version=0.12.1.0, Culture=neutral, PublicKeyToken=e83494dcdc6d31ea, processorArchitecture=MSIL">
<HintPath>..\packages\AngleSharp.Js.0.12.1\lib\net46\AngleSharp.Js.dll</HintPath>
</Reference>
<Reference Include="jint, Version=2.10.4.0, Culture=neutral, PublicKeyToken=2e92ba9c8d81157f, processorArchitecture=MSIL">
<HintPath>..\packages\jint.2.10.4\lib\net45\jint.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Diagnostics.Contracts" />
<Reference Include="System.Net" />
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.0\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Text.Encoding.CodePages, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Text.Encoding.CodePages.4.5.0\lib\net46\System.Text.Encoding.CodePages.dll</HintPath>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />

Просмотреть файл

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
@ -11,7 +11,7 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="AngleSharp" publicKeyToken="e83494dcdc6d31ea" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-0.9.9.0" newVersion="0.9.9.0" />
<bindingRedirect oldVersion="0.0.0.0-0.12.1.0" newVersion="0.12.1.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>

Просмотреть файл

@ -1,7 +1,7 @@
namespace AngleSharp.Samples.Demos.Snippets
{
using AngleSharp.Dom.Html;
using AngleSharp.Extensions;
using AngleSharp.Dom;
using AngleSharp.Html.Dom;
using System;
using System.Threading.Tasks;

Просмотреть файл

@ -1,8 +1,7 @@
namespace AngleSharp.Samples.Demos.Snippets
{
using AngleSharp.Dom;
using AngleSharp.Dom.Html;
using AngleSharp.Extensions;
using AngleSharp.Html.Dom;
using System;
using System.Collections.Generic;
using System.Linq;

Просмотреть файл

@ -8,8 +8,9 @@
public async Task Run()
{
// We require a custom configuration with JavaScript
var config = Configuration.Default.WithJavaScript().
WithConsoleLogger(context => new StandardConsoleLogger());
var config = Configuration.Default
.WithJs()
.WithConsoleLogger(context => new StandardConsoleLogger());
// This is our sample source, we will trigger the load event
var source = @"<!doctype html>

Просмотреть файл

@ -9,7 +9,7 @@
{
//We require a custom configuration with JavaScript and CSS
var config = Configuration.Default
.WithJavaScript()
.WithJs()
.WithCss();
// This is our sample source, we will do some DOM manipulation

Просмотреть файл

@ -10,7 +10,7 @@
{
// We require a custom configuration with JavaScript, CSS and the default loader
var config = Configuration.Default
.WithJavaScript()
.WithJs()
.WithCss()
.WithDefaultLoader();

Просмотреть файл

@ -8,8 +8,9 @@
public async Task Run()
{
// We require a custom configuration with JavaScript
var config = Configuration.Default.WithJavaScript().
WithConsoleLogger(context => new StandardConsoleLogger());
var config = Configuration.Default
.WithJs()
.WithConsoleLogger(context => new StandardConsoleLogger());
// This is our sample source, we will trigger the load event
var source = @"<!doctype html>

Просмотреть файл

@ -8,7 +8,7 @@
public async Task Run()
{
// We require a custom configuration with JavaScript
var config = Configuration.Default.WithJavaScript();
var config = Configuration.Default.WithJs();
// This is our sample source, we will set the title and write on the document
var source = @"<!doctype html>

Просмотреть файл

@ -1,6 +1,6 @@
namespace AngleSharp.Samples.Demos.Snippets
{
using AngleSharp.Extensions;
using AngleSharp.Dom;
using System;
using System.Threading.Tasks;

Просмотреть файл

@ -1,6 +1,6 @@
namespace AngleSharp.Samples.Demos.Snippets
{
using AngleSharp.Extensions;
using AngleSharp.Dom;
using System;
using System.Linq;
using System.Threading.Tasks;

Просмотреть файл

@ -1,6 +1,6 @@
namespace AngleSharp.Samples.Demos
{
using AngleSharp.Scripting.JavaScript.Services;
using AngleSharp.Js;
using System;
using System.Linq;

Просмотреть файл

@ -1,6 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="AngleSharp" version="0.9.9" targetFramework="net45" />
<package id="AngleSharp.Scripting.JavaScript" version="0.5.0" targetFramework="net45" />
<package id="Jint" version="2.9.1" targetFramework="net45" />
<package id="AngleSharp" version="0.12.1" targetFramework="net461" />
<package id="AngleSharp.Css" version="0.12.1" targetFramework="net461" />
<package id="AngleSharp.Js" version="0.12.1" targetFramework="net461" />
<package id="jint" version="2.10.4" targetFramework="net461" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.0" targetFramework="net461" />
<package id="System.Text.Encoding.CodePages" version="4.5.0" targetFramework="net46" requireReinstallation="true" />
</packages>

Просмотреть файл

@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.22310.1
# Visual Studio 15
VisualStudioVersion = 15.0.28307.572
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AngleSharp.Samples.App", "AngleSharp.Samples.App\AngleSharp.Samples.App.csproj", "{DA318620-F6B5-4DFA-B012-38F06141A2DD}"
EndProject
@ -25,4 +25,7 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {0DF14775-AB02-41C1-B392-62858D096DB1}
EndGlobalSection
EndGlobal