Updated to v0.8.7 and changed API

This commit is contained in:
Florian Rappl 2015-07-16 00:33:54 +02:00
Родитель a84649f0b4
Коммит 0e4a0894c7
4 изменённых файлов: 9 добавлений и 12 удалений

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

@ -41,9 +41,9 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Accessibility" />
<Reference Include="AngleSharp, Version=0.8.6.41008, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="AngleSharp, Version=0.8.7.41616, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\AngleSharp.0.8.6\lib\net45\AngleSharp.dll</HintPath>
<HintPath>..\packages\AngleSharp.0.8.7\lib\net45\AngleSharp.dll</HintPath>
</Reference>
<Reference Include="AngleSharp.Scripting.JavaScript, Version=0.1.6.39665, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>

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

@ -21,17 +21,17 @@
Register<CssParseStartEvent>(m =>
{
var start = _time.Elapsed;
m.Ended += _ => AddItem("Parse CSS " + _.Href, OxyColors.Violet, start, _time.Elapsed);
m.Ended += (s, e) => AddItem("Parse CSS " + m.StyleSheet.Href, OxyColors.Violet, start, _time.Elapsed);
});
Register<HtmlParseStartEvent>(m =>
{
var start = _time.Elapsed;
m.Ended += _ => AddItem("Parse HTML " + _.Url, OxyColors.Orange, start, _time.Elapsed);
m.Ended += (s, e) => AddItem("Parse HTML " + m.Document.Url, OxyColors.Orange, start, _time.Elapsed);
});
Register<RequestStartEvent>(m =>
{
var start = _time.Elapsed;
m.Ended += _ => AddItem((_ != null ? "Response " + _.Address.Href : "No response"), OxyColors.Red, start, _time.Elapsed);
m.Ended += (s, e) => AddItem("Request for " + m.Request.Address.Href, OxyColors.Red, start, _time.Elapsed);
});
}

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

@ -2,11 +2,8 @@
{
using AngleSharp.Dom;
using AngleSharp.Dom.Css;
using AngleSharp.Dom.Html;
using AngleSharp;
using System.Collections.ObjectModel;
using AngleSharp.Events;
using System.Windows.Threading;
using System.Collections.ObjectModel;
public class SheetViewModel : BaseViewModel, ITabViewModel, ISubscriber<CssParseStartEvent>
{
@ -73,9 +70,9 @@
void ISubscriber<CssParseStartEvent>.OnEventData(CssParseStartEvent data)
{
data.Ended += sheet =>
data.Ended += (s, e) =>
{
App.Current.Dispatcher.Invoke(() => source.Add(sheet));
App.Current.Dispatcher.Invoke(() => source.Add(data.StyleSheet));
};
}
}

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

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="AngleSharp" version="0.8.6" targetFramework="net45" />
<package id="AngleSharp" version="0.8.7" targetFramework="net45" />
<package id="AngleSharp.Scripting.JavaScript" version="0.1.6" targetFramework="net45" />
<package id="Jint" version="2.5.0" targetFramework="net45" />
<package id="MahApps.Metro" version="1.1.2.0" targetFramework="net45" />