3 new revisions:
Revision: 9684739eeb2c
Branch: default
Author: azizatif
Date: Fri Jan 4 10:41:53 2013
Log: Initial Hg ignores file
http://code.google.com/p/fizzler/source/detail?r=9684739eeb2c
Revision: de06ca80c390
Branch: default
Author: azizatif
Date: Fri Jan 4 23:46:20 2013
Log: Upgrade to VS 2012 and MSBuild 4
http://code.google.com/p/fizzler/source/detail?r=de06ca80c390
Revision: 666897b06c13
Branch: default
Author: azizatif
Date: Wed Jan 9 04:38:17 2013
Log: Try use proxy auth automatically when needed
http://code.google.com/p/fizzler/source/detail?r=666897b06c13
==============================================================================
Revision: 9684739eeb2c
Branch: default
Author: azizatif
Date: Fri Jan 4 10:41:53 2013
Log: Initial Hg ignores file
http://code.google.com/p/fizzler/source/detail?r=9684739eeb2c
Added:
/.hgignore
=======================================
--- /dev/null
+++ /.hgignore Fri Jan 4 10:41:53 2013
@@ -0,0 +1,17 @@
+syntax: glob
+bin/**
+Bin/**
+*.dll
+*.pdb
+*.user
+*.cache
+*.suo
+*.docstates
+obj/**
+_ReSharper.*
+*.DotSettings
+*.orig
+*.rej
+dist/**
+pkg/*/**
+*.nupkg
==============================================================================
Revision: de06ca80c390
Branch: default
Author: azizatif
Date: Fri Jan 4 23:46:20 2013
Log: Upgrade to VS 2012 and MSBuild 4
http://code.google.com/p/fizzler/source/detail?r=de06ca80c390
Modified:
/ConsoleFizzler/ConsoleFizzler.csproj
/Fizzler.Sandbox/Fizzler.Sandbox.csproj
/Fizzler.Systems.HtmlAgilityPack/Fizzler.Systems.HtmlAgilityPack.csproj
/Fizzler.Tests/Fizzler.Tests.csproj
/Fizzler.sln
/Fizzler/Fizzler.csproj
/NET-2.0/Fizzler.Systems.HtmlAgilityPack.csproj
/NET-2.0/Fizzler.Tests.csproj
/NET-2.0/Fizzler.csproj
/VisualFizzler/Properties/Resources.Designer.cs
/VisualFizzler/Properties/Settings.Designer.cs
/VisualFizzler/VisualFizzler.csproj
/build.cmd
=======================================
--- /ConsoleFizzler/ConsoleFizzler.csproj Tue Feb 2 14:46:14 2010
+++ /ConsoleFizzler/ConsoleFizzler.csproj Fri Jan 4 23:46:20 2013
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" DefaultTargets="Build"
xmlns="
http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="4.0" DefaultTargets="Build"
xmlns="
http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)'
== '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -12,6 +12,11 @@
<AssemblyName>fizz</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ <OldToolsVersion>3.5</OldToolsVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|
AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
=======================================
--- /Fizzler.Sandbox/Fizzler.Sandbox.csproj Wed Sep 30 10:53:50 2009
+++ /Fizzler.Sandbox/Fizzler.Sandbox.csproj Fri Jan 4 23:46:20 2013
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" DefaultTargets="Build"
xmlns="
http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="4.0" DefaultTargets="Build"
xmlns="
http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)'
== '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -12,6 +12,11 @@
<AssemblyName>Fizzler.Sandbox</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ <OldToolsVersion>3.5</OldToolsVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|
AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
=======================================
--- /Fizzler.Systems.HtmlAgilityPack/Fizzler.Systems.HtmlAgilityPack.csproj
Wed Sep 30 23:20:04 2009
+++ /Fizzler.Systems.HtmlAgilityPack/Fizzler.Systems.HtmlAgilityPack.csproj
Fri Jan 4 23:46:20 2013
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" DefaultTargets="Build"
xmlns="
http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="4.0" DefaultTargets="Build"
xmlns="
http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)'
== '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -12,6 +12,11 @@
<AssemblyName>Fizzler.Systems.HtmlAgilityPack</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ <OldToolsVersion>3.5</OldToolsVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|
AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
=======================================
--- /Fizzler.Tests/Fizzler.Tests.csproj Wed Oct 6 16:15:18 2010
+++ /Fizzler.Tests/Fizzler.Tests.csproj Fri Jan 4 23:46:20 2013
@@ -1,4 +1,5 @@
-<Project ToolsVersion="3.5" DefaultTargets="Build"
xmlns="
http://schemas.microsoft.com/developer/msbuild/2003">
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build"
xmlns="
http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)'
== '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -11,6 +12,11 @@
<AssemblyName>Fizzler.Tests</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ <OldToolsVersion>3.5</OldToolsVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|
AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
=======================================
--- /Fizzler.sln Wed Sep 30 10:53:50 2009
+++ /Fizzler.sln Fri Jan 4 23:46:20 2013
@@ -1,25 +1,25 @@
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}")
= "Fizzler", "Fizzler\Fizzler.csproj", "{939036D6-29FD-46E4-B6CD-52618F51081B}"
-EndProject
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2012
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution
Items", "Solution Items", "{8FC1F69B-FAFC-484C-984B-78FA7E224BCB}"
ProjectSection(SolutionItems) = preProject
default.build = default.build
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}")
= "Fizzler.Tests", "Fizzler.Tests\Fizzler.Tests.csproj", "{61EDF5C0-1854-4867-AE8A-7A1216E116C9}"
-EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}")
= "Systems", "Systems", "{7AA23AC0-0852-45AC-8661-6FFBD3BD265D}"
EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}")
= "NET-2.0", "NET-2.0", "{1A630545-B74B-4EEE-B0B6-DD8E2A6CAB02}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}")
= "Fizzler", "Fizzler\Fizzler.csproj", "{939036D6-29FD-46E4-B6CD-52618F51081B}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}")
= "Fizzler.Tests", "Fizzler.Tests\Fizzler.Tests.csproj", "{61EDF5C0-1854-4867-AE8A-7A1216E116C9}"
+EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}")
= "Fizzler.Systems.HtmlAgilityPack", "Fizzler.Systems.HtmlAgilityPack\Fizzler.Systems.HtmlAgilityPack.csproj", "{DBEAD205-BD5C-461F-873D-DE643016F14C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}")
= "VisualFizzler", "VisualFizzler\VisualFizzler.csproj", "{46AA901E-21D1-4720-B173-532B91105CE7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}")
= "Fizzler.Sandbox", "Fizzler.Sandbox\Fizzler.Sandbox.csproj", "{80456F6D-6853-4244-8E3D-F22ECA0980EC}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}")
= "NET-2.0", "NET-2.0", "{1A630545-B74B-4EEE-B0B6-DD8E2A6CAB02}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}")
= "Fizzler", "NET-2.0\Fizzler.csproj", "{278E9225-9FE5-4D63-9C9B-206FC68BAA37}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}")
= "Fizzler.Systems.HtmlAgilityPack", "NET-2.0\Fizzler.Systems.HtmlAgilityPack.csproj", "{48822D9C-C17E-412B-96AE-F740EEF87990}"
=======================================
--- /Fizzler/Fizzler.csproj Wed Nov 11 17:13:55 2009
+++ /Fizzler/Fizzler.csproj Fri Jan 4 23:46:20 2013
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" DefaultTargets="Build"
xmlns="
http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="4.0" DefaultTargets="Build"
xmlns="
http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)'
== '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -14,6 +14,11 @@
<FileAlignment>512</FileAlignment>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>Fizzler.snk</AssemblyOriginatorKeyFile>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ <OldToolsVersion>3.5</OldToolsVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|
AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
=======================================
--- /NET-2.0/Fizzler.Systems.HtmlAgilityPack.csproj Wed Nov 11 17:13:55 2009
+++ /NET-2.0/Fizzler.Systems.HtmlAgilityPack.csproj Fri Jan 4 23:46:20 2013
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" DefaultTargets="Build"
xmlns="
http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="4.0" DefaultTargets="Build"
xmlns="
http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)'
== '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -12,6 +12,11 @@
<AssemblyName>Fizzler.Systems.HtmlAgilityPack</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ <OldToolsVersion>3.5</OldToolsVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|
AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
=======================================
--- /NET-2.0/Fizzler.Tests.csproj Wed Nov 11 17:13:55 2009
+++ /NET-2.0/Fizzler.Tests.csproj Fri Jan 4 23:46:20 2013
@@ -1,4 +1,5 @@
-<Project ToolsVersion="3.5" DefaultTargets="Build"
xmlns="
http://schemas.microsoft.com/developer/msbuild/2003">
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build"
xmlns="
http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)'
== '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -11,6 +12,11 @@
<AssemblyName>Fizzler.Tests</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ <OldToolsVersion>3.5</OldToolsVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|
AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
=======================================
--- /NET-2.0/Fizzler.csproj Wed Nov 11 17:13:55 2009
+++ /NET-2.0/Fizzler.csproj Fri Jan 4 23:46:20 2013
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" DefaultTargets="Build"
xmlns="
http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="4.0" DefaultTargets="Build"
xmlns="
http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)'
== '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -14,6 +14,11 @@
<FileAlignment>512</FileAlignment>
<SignAssembly>false</SignAssembly>
<AssemblyOriginatorKeyFile>..\Fizzler\Fizzler.snk</AssemblyOriginatorKeyFile>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ <OldToolsVersion>3.5</OldToolsVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|
AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
=======================================
--- /VisualFizzler/Properties/Resources.Designer.cs Sun Apr 26 13:20:22 2009
+++ /VisualFizzler/Properties/Resources.Designer.cs Fri Jan 4 23:46:20 2013
@@ -1,17 +1,17 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
-// Runtime Version:2.0.50727.3053
+// Runtime Version:4.0.30319.18010
//
// Changes to this file may cause incorrect behavior and will be lost
if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
-namespace VisualFizzler.Properties
-{
-
-
+namespace VisualFizzler.Properties {
+ using System;
+
+
/// <summary>
/// A strongly-typed resource class, for looking up localized
strings, etc.
/// </summary>
@@ -19,51 +19,43 @@
// 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", "2.0.0.0")]
+
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.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("VisualFizzler.Properties.Resources",
typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
-
+
/// <summary>
/// Overrides the current thread's CurrentUICulture property for
all
/// 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;
}
}
=======================================
--- /VisualFizzler/Properties/Settings.Designer.cs Sun Apr 26 13:20:22 2009
+++ /VisualFizzler/Properties/Settings.Designer.cs Fri Jan 4 23:46:20 2013
@@ -1,28 +1,24 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
-// Runtime Version:2.0.50727.3053
+// Runtime Version:4.0.30319.18010
//
// Changes to this file may cause incorrect behavior and will be lost
if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
-namespace VisualFizzler.Properties
-{
-
-
+namespace VisualFizzler.Properties {
+
+
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
-
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")]
- internal sealed partial class Settings :
global::System.Configuration.ApplicationSettingsBase
- {
-
+
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
+ internal sealed partial class Settings :
global::System.Configuration.ApplicationSettingsBase {
+
private static Settings defaultInstance =
((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new
Settings())));
-
- public static Settings Default
- {
- get
- {
+
+ public static Settings Default {
+ get {
return defaultInstance;
}
}
=======================================
--- /VisualFizzler/VisualFizzler.csproj Mon Feb 1 15:08:10 2010
+++ /VisualFizzler/VisualFizzler.csproj Fri Jan 4 23:46:20 2013
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" DefaultTargets="Build"
xmlns="
http://schemas.microsoft.com/developer/msbuild/2003">
+<Project ToolsVersion="4.0" DefaultTargets="Build"
xmlns="
http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)'
== '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -12,6 +12,11 @@
<AssemblyName>VisualFizzler</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ <OldToolsVersion>3.5</OldToolsVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|
AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -76,6 +81,7 @@
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
+ <DesignTime>True</DesignTime>
</Compile>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
=======================================
--- /build.cmd Thu May 14 16:30:58 2009
+++ /build.cmd Fri Jan 4 23:46:20 2013
@@ -1,4 +1,16 @@
@echo off
-for %%i in (Debug Release) do (
- "%SystemRoot%\Microsoft.NET\Framework\v3.5\msbuild"
/p:Configuration=%%i "%~dp0Fizzler.sln" %*
+setlocal
+pushd "%~dp0"
+call :main %*
+popd
+goto :EOF
+
+:main
+set MSBUILDEXE=%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
+if not exist "%MSBUILDEXE%" (
+ echo Microsoft .NET Framework 4.0 does not appear to be installed on
this
+ echo machine, which is required to build the solution.
+ exit /b 1
)
+for %%s in (*.sln) do for %%c in (Debug Release) do if not errorlevel
1 "%MSBUILDEXE%" "%%s" /p:Configuration=%%c /v:m %*
+goto :EOF
==============================================================================
Revision: 666897b06c13
Branch: default
Author: azizatif
Date: Wed Jan 9 04:38:17 2013
Log: Try use proxy auth automatically when needed
http://code.google.com/p/fizzler/source/detail?r=666897b06c13
Added:
/VisualFizzler/WebClient.cs
Modified:
/VisualFizzler/MainForm.cs
/VisualFizzler/VisualFizzler.csproj
=======================================
--- /dev/null
+++ /VisualFizzler/WebClient.cs Wed Jan 9 04:38:17 2013
@@ -0,0 +1,159 @@
+#region License and Terms
+//
+// OpenWebClient
+// Copyright (c) 2013 Atif Aziz. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//
http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#endregion
+
+namespace OpenWebClient
+{
+ #region Imports
+
+ using System;
+ using System.Diagnostics;
+ using System.Linq;
+ using System.Net;
+
+ #endregion
+
+ partial class WebClient : System.Net.WebClient
+ {
+ public Func<WebRequest, WebRequest> WebRequestModifier { get; set;
}
+
+ protected override WebRequest GetWebRequest(Uri address)
+ {
+ var request = base.GetWebRequest(address);
+ var modifier = WebRequestModifier ?? (wr => wr);
+ return modifier.GetInvocationList()
+ .Cast<Func<WebRequest, WebRequest>>()
+ .Select(m => new Func<WebRequest,
WebRequest>(wr => m(Validate(wr))))
+ .Aggregate((im, om) => wr =>
om(im(wr)))(request);
+ }
+
+ static WebRequest Validate(WebRequest request)
+ {
+ if (request == null) throw new
ArgumentNullException("request");
+ return request;
+ }
+ }
+
+ static partial class WebClientExtensions
+ {
+ /// <summary>
+ /// Adds a simple web request modifier called for each request
+ /// issued by this <see cref="WebClient"/>.
+ /// </summary>
+
+ public static WebClient AddWebRequestModifier(this WebClient
client, Action<WebRequest> modifier)
+ {
+ return client.AddWebRequestModifier<WebRequest>(modifier);
+ }
+
+ /// <summary>
+ /// Adds a simple web request modifier called for each request of
+ /// type <see cref="HttpWebRequest"/> issued by this
+ /// <see cref="WebClient"/>.
+ /// </summary>
+
+ public static WebClient AddHttpWebRequestModifier(this WebClient
client, Action<HttpWebRequest> modifier)
+ {
+ return client.AddWebRequestModifier(modifier);
+ }
+
+ /// <summary>
+ /// Adds a simple web request modifier called for each request of
+ /// type <see cref="WebRequest"/> issued by this
+ /// <see cref="WebClient"/>.
+ /// </summary>
+
+ public static WebClient AddWebRequestModifier<T>(this WebClient
client, Action<T> modifier)
+ where T : WebRequest
+ {
+ if (client == null) throw new ArgumentNullException("client");
+ client.WebRequestModifier += Typed(modifier);
+ return client;
+ }
+
+ /// <summary>
+ /// Adds a simple web request modifier that is called for only the
+ /// next request issued by this <see cref="WebClient"/> and then
+ /// discarded.
+ /// </summary>
+ /// <remarks>
+ /// The modifier is only called once regardless of whether it
throws
+ /// an exception or not.
+ /// </remarks>
+
+ public static WebClient AddOneTimeWebRequestModifier(this
WebClient client, Action<WebRequest> modifier)
+ {
+ return
client.AddOneTimeWebRequestModifier<WebRequest>(modifier);
+ }
+
+ /// <summary>
+ /// Adds a simple web request modifier called for only the next
+ /// request of type <see cref="HttpWebRequest"/> issued by this
+ /// <see cref="WebClient"/> and then discarded.
+ /// </summary>
+ /// <remarks>
+ /// The modifier is only called once regardless of whether it
throws
+ /// an exception or not.
+ /// </remarks>
+
+ public static WebClient AddOneTimeHttpWebRequestModifier(this
WebClient client, Action<HttpWebRequest> modifier)
+ {
+ return client.AddOneTimeWebRequestModifier(modifier);
+ }
+
+ /// <summary>
+ /// Adds a simple web request modifier called for only the next
+ /// request of type <see cref="{T}"/> issued by this
+ /// <see cref="WebClient"/> and then discarded, where
+ /// <see cref="{T}"/> is an instance of <see cref="{WebRequest}"/>.
+ /// </summary>
+ /// <remarks>
+ /// The modifier is only called once regardless of whether it
throws
+ /// an exception or not.
+ /// </remarks>
+
+ public static WebClient AddOneTimeWebRequestModifier<T>(this
WebClient client, Action<T> modifier)
+ where T : WebRequest
+ {
+ if (client == null) throw new ArgumentNullException("client");
+
+ var cell = new Func<WebRequest, WebRequest>[1];
+ cell[0] = Typed<T>(wr =>
+ {
+ client.WebRequestModifier -= cell[0];
+ modifier(wr);
+ });
+ client.WebRequestModifier += cell[0];
+
+ return client;
+ }
+
+ static Func<WebRequest, WebRequest> Typed<T>(Action<T> modifier)
where T : WebRequest
+ {
+ if (modifier == null) throw new
ArgumentNullException("modifier");
+
+ return request =>
+ {
+ var typedRequest = request as T;
+ if (typedRequest != null)
+ modifier(typedRequest);
+ return request;
+ };
+ }
+ }
+}
=======================================
--- /VisualFizzler/MainForm.cs Mon Feb 1 15:08:10 2010
+++ /VisualFizzler/MainForm.cs Wed Jan 9 04:38:17 2013
@@ -13,6 +13,8 @@
using HtmlAgilityPack;
using Mannex.Net;
using Microsoft.VisualBasic;
+using OpenWebClient;
+using WebClient=OpenWebClient.WebClient;
using HtmlDocument=HtmlAgilityPack.HtmlDocument;
namespace VisualFizzler
@@ -116,16 +118,34 @@
string content;
var wc = new WebClient();
+ bool proxyAuthAttempted = false;
- try
+ while (true)
{
- using (CurrentCursorScope.EnterWait())
- content = wc.DownloadStringUsingResponseEncoding(url);
- }
- catch (WebException e)
- {
- Program.ShowExceptionDialog(e, "Import Error", this);
- return;
+ try
+ {
+ using (CurrentCursorScope.EnterWait())
+ content =
wc.DownloadStringUsingResponseEncoding(url);
+ break;
+ }
+ catch (WebException e)
+ {
+ if (e.Status == WebExceptionStatus.ProtocolError
+ && !proxyAuthAttempted)
+ {
+ var httpResponse = e.Response as HttpWebResponse;
+ if (httpResponse != null
+ && HttpStatusCode.ProxyAuthenticationRequired
== httpResponse.StatusCode)
+ {
+ proxyAuthAttempted = true;
+ wc.AddHttpWebRequestModifier(hwr =>
hwr.Proxy.Credentials = CredentialCache.DefaultCredentials);
+ continue;
+ }
+ }
+
+ Program.ShowExceptionDialog(e, "Import Error", this);
+ return;
+ }
}
//
=======================================
--- /VisualFizzler/VisualFizzler.csproj Fri Jan 4 23:46:20 2013
+++ /VisualFizzler/VisualFizzler.csproj Wed Jan 9 04:38:17 2013
@@ -69,6 +69,9 @@
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="WebClient.cs">
+ <SubType>Component</SubType>
+ </Compile>
<EmbeddedResource Include="MainForm.resx">
<DependentUpon>MainForm.cs</DependentUpon>
<SubType>Designer</SubType>