From d280868fc8266b0326d23310e5330f4524e22c45 Mon Sep 17 00:00:00 2001 From: headhunter45_cp <672652+headhunter45@users.noreply.github.com> Date: Sun, 26 Sep 2010 06:31:06 +0000 Subject: [PATCH] --- .../LocalTestRun.testrunconfig | 5 + .../Plan B Html Parser.sln | 73 ++++ .../Plan B Html Parser.vsmdi | 6 + .../Plan B Html Parser.vssscc | 10 + .../Content/Content.contentproj | 52 +++ .../Content/Content.contentproj.vspscc | 10 + .../Plan B Html Parser/Nodes/HtmlBrNode.cs | 30 ++ .../Plan B Html Parser/Nodes/HtmlDivNode.cs | 13 + .../Nodes/HtmlDocumentNode.cs | 47 +++ .../Plan B Html Parser/Nodes/HtmlImgNode.cs | 13 + .../Plan B Html Parser/Nodes/HtmlNode.cs | 191 ++++++++++ .../Plan B Html Parser/Nodes/HtmlSpanNode.cs | 37 ++ .../Plan B Html Parser/Nodes/HtmlTextNode.cs | 62 ++++ .../Plan B Html Parser/Parser.cs | 289 +++++++++++++++ .../Plan B Html Parser.csproj | 149 ++++++++ .../Plan B Html Parser.csproj.vspscc | 10 + .../Properties/AssemblyInfo.cs | 31 ++ .../Tokens/HtmlBeginDivToken.cs | 11 + .../Tokens/HtmlBeginSpanToken.cs | 15 + .../Plan B Html Parser/Tokens/HtmlBrToken.cs | 15 + .../Tokens/HtmlEndDivToken.cs | 11 + .../Tokens/HtmlEndSpanToken.cs | 15 + .../Plan B Html Parser/Tokens/HtmlImgToken.cs | 11 + .../Tokens/HtmlTextToken.cs | 27 ++ .../Plan B Html Parser/Tokens/HtmlToken.cs | 39 ++ .../TestProject1/AuthoringTests.txt | 136 +++++++ .../TestProject1/ParseErrorTests.cs | 178 +++++++++ .../TestProject1/ParseTests.cs | 346 ++++++++++++++++++ .../TestProject1/Properties/AssemblyInfo.cs | 35 ++ .../TestProject1/TestProject1.csproj | 68 ++++ .../TestProject1/TestProject1.csproj.vspscc | 10 + 31 files changed, 1945 insertions(+) create mode 100644 Plan B Html Parser (XNA 3.1)/LocalTestRun.testrunconfig create mode 100644 Plan B Html Parser (XNA 3.1)/Plan B Html Parser.sln create mode 100644 Plan B Html Parser (XNA 3.1)/Plan B Html Parser.vsmdi create mode 100644 Plan B Html Parser (XNA 3.1)/Plan B Html Parser.vssscc create mode 100644 Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Content/Content.contentproj create mode 100644 Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Content/Content.contentproj.vspscc create mode 100644 Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Nodes/HtmlBrNode.cs create mode 100644 Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Nodes/HtmlDivNode.cs create mode 100644 Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Nodes/HtmlDocumentNode.cs create mode 100644 Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Nodes/HtmlImgNode.cs create mode 100644 Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Nodes/HtmlNode.cs create mode 100644 Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Nodes/HtmlSpanNode.cs create mode 100644 Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Nodes/HtmlTextNode.cs create mode 100644 Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Parser.cs create mode 100644 Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Plan B Html Parser.csproj create mode 100644 Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Plan B Html Parser.csproj.vspscc create mode 100644 Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Properties/AssemblyInfo.cs create mode 100644 Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Tokens/HtmlBeginDivToken.cs create mode 100644 Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Tokens/HtmlBeginSpanToken.cs create mode 100644 Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Tokens/HtmlBrToken.cs create mode 100644 Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Tokens/HtmlEndDivToken.cs create mode 100644 Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Tokens/HtmlEndSpanToken.cs create mode 100644 Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Tokens/HtmlImgToken.cs create mode 100644 Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Tokens/HtmlTextToken.cs create mode 100644 Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Tokens/HtmlToken.cs create mode 100644 Plan B Html Parser (XNA 3.1)/TestProject1/AuthoringTests.txt create mode 100644 Plan B Html Parser (XNA 3.1)/TestProject1/ParseErrorTests.cs create mode 100644 Plan B Html Parser (XNA 3.1)/TestProject1/ParseTests.cs create mode 100644 Plan B Html Parser (XNA 3.1)/TestProject1/Properties/AssemblyInfo.cs create mode 100644 Plan B Html Parser (XNA 3.1)/TestProject1/TestProject1.csproj create mode 100644 Plan B Html Parser (XNA 3.1)/TestProject1/TestProject1.csproj.vspscc diff --git a/Plan B Html Parser (XNA 3.1)/LocalTestRun.testrunconfig b/Plan B Html Parser (XNA 3.1)/LocalTestRun.testrunconfig new file mode 100644 index 0000000..d3774a4 --- /dev/null +++ b/Plan B Html Parser (XNA 3.1)/LocalTestRun.testrunconfig @@ -0,0 +1,5 @@ + + + This is a default test run configuration for a local test run. + + \ No newline at end of file diff --git a/Plan B Html Parser (XNA 3.1)/Plan B Html Parser.sln b/Plan B Html Parser (XNA 3.1)/Plan B Html Parser.sln new file mode 100644 index 0000000..1be3016 --- /dev/null +++ b/Plan B Html Parser (XNA 3.1)/Plan B Html Parser.sln @@ -0,0 +1,73 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Plan B Html Parser", "Plan B Html Parser\Plan B Html Parser.csproj", "{A6FA0455-ACB5-4E80-9E58-6B79976AA717}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestProject1", "TestProject1\TestProject1.csproj", "{9E7D5692-C2E9-4219-977E-143CC75B5737}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{AD007B35-38A3-47C0-B9DE-A1805B67270C}" + ProjectSection(SolutionItems) = preProject + LocalTestRun.testrunconfig = LocalTestRun.testrunconfig + Plan B Html Parser.vsmdi = Plan B Html Parser.vsmdi + EndProjectSection +EndProject +Global + GlobalSection(TeamFoundationVersionControl) = preSolution + SccNumberOfProjects = 4 + SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C} + SccTeamFoundationServer = https://tfs.codeplex.com/tfs/TFS14 + SccLocalPath0 = . + SccProjectUniqueName1 = Plan\u0020B\u0020Html\u0020Parser\\Content\\Content.contentproj + SccProjectTopLevelParentUniqueName1 = Plan\u0020B\u0020Html\u0020Parser\\Plan\u0020B\u0020Html\u0020Parser.csproj + SccProjectName1 = Plan\u0020B\u0020Html\u0020Parser/Content + SccLocalPath1 = Plan\u0020B\u0020Html\u0020Parser\\Content + SccProjectUniqueName2 = Plan\u0020B\u0020Html\u0020Parser\\Plan\u0020B\u0020Html\u0020Parser.csproj + SccProjectName2 = Plan\u0020B\u0020Html\u0020Parser + SccLocalPath2 = Plan\u0020B\u0020Html\u0020Parser + SccProjectUniqueName3 = TestProject1\\TestProject1.csproj + SccProjectName3 = TestProject1 + SccLocalPath3 = TestProject1 + EndGlobalSection + GlobalSection(TestCaseManagementSettings) = postSolution + CategoryFile = Plan B Html Parser.vsmdi + EndGlobalSection + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|Mixed Platforms = Debug|Mixed Platforms + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|Mixed Platforms = Release|Mixed Platforms + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {A6FA0455-ACB5-4E80-9E58-6B79976AA717}.Debug|Any CPU.ActiveCfg = Debug|x86 + {A6FA0455-ACB5-4E80-9E58-6B79976AA717}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {A6FA0455-ACB5-4E80-9E58-6B79976AA717}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {A6FA0455-ACB5-4E80-9E58-6B79976AA717}.Debug|x86.ActiveCfg = Debug|x86 + {A6FA0455-ACB5-4E80-9E58-6B79976AA717}.Debug|x86.Build.0 = Debug|x86 + {A6FA0455-ACB5-4E80-9E58-6B79976AA717}.Release|Any CPU.ActiveCfg = Release|x86 + {A6FA0455-ACB5-4E80-9E58-6B79976AA717}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {A6FA0455-ACB5-4E80-9E58-6B79976AA717}.Release|Mixed Platforms.Build.0 = Release|x86 + {A6FA0455-ACB5-4E80-9E58-6B79976AA717}.Release|x86.ActiveCfg = Release|x86 + {A6FA0455-ACB5-4E80-9E58-6B79976AA717}.Release|x86.Build.0 = Release|x86 + {9E7D5692-C2E9-4219-977E-143CC75B5737}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9E7D5692-C2E9-4219-977E-143CC75B5737}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9E7D5692-C2E9-4219-977E-143CC75B5737}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {9E7D5692-C2E9-4219-977E-143CC75B5737}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {9E7D5692-C2E9-4219-977E-143CC75B5737}.Debug|x86.ActiveCfg = Debug|Any CPU + {9E7D5692-C2E9-4219-977E-143CC75B5737}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9E7D5692-C2E9-4219-977E-143CC75B5737}.Release|Any CPU.Build.0 = Release|Any CPU + {9E7D5692-C2E9-4219-977E-143CC75B5737}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {9E7D5692-C2E9-4219-977E-143CC75B5737}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {9E7D5692-C2E9-4219-977E-143CC75B5737}.Release|x86.ActiveCfg = Release|Any CPU + {730F03D9-CB96-43A9-88E3-A8687A66CF5E}.Debug|Any CPU.ActiveCfg = Debug|x86 + {730F03D9-CB96-43A9-88E3-A8687A66CF5E}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {730F03D9-CB96-43A9-88E3-A8687A66CF5E}.Debug|x86.ActiveCfg = Debug|x86 + {730F03D9-CB96-43A9-88E3-A8687A66CF5E}.Release|Any CPU.ActiveCfg = Release|x86 + {730F03D9-CB96-43A9-88E3-A8687A66CF5E}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {730F03D9-CB96-43A9-88E3-A8687A66CF5E}.Release|x86.ActiveCfg = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Plan B Html Parser (XNA 3.1)/Plan B Html Parser.vsmdi b/Plan B Html Parser (XNA 3.1)/Plan B Html Parser.vsmdi new file mode 100644 index 0000000..ab64a96 --- /dev/null +++ b/Plan B Html Parser (XNA 3.1)/Plan B Html Parser.vsmdi @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Plan B Html Parser (XNA 3.1)/Plan B Html Parser.vssscc b/Plan B Html Parser (XNA 3.1)/Plan B Html Parser.vssscc new file mode 100644 index 0000000..794f014 --- /dev/null +++ b/Plan B Html Parser (XNA 3.1)/Plan B Html Parser.vssscc @@ -0,0 +1,10 @@ +"" +{ +"FILE_VERSION" = "9237" +"ENLISTMENT_CHOICE" = "NEVER" +"PROJECT_FILE_RELATIVE_PATH" = "" +"NUMBER_OF_EXCLUDED_FILES" = "0" +"ORIGINAL_PROJECT_FILE_PATH" = "" +"NUMBER_OF_NESTED_PROJECTS" = "0" +"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROJECT" +} diff --git a/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Content/Content.contentproj b/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Content/Content.contentproj new file mode 100644 index 0000000..dcf8ab2 --- /dev/null +++ b/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Content/Content.contentproj @@ -0,0 +1,52 @@ + + + 730f03d9-cb96-43a9-88e3-a8687a66cf5e + {96E2B04D-8817-42c6-938A-82C39BA4D311};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + Debug + x86 + Library + Properties + v3.5 + v3.1 + x86 + bin\$(Platform)\$(Configuration) + SAK + SAK + SAK + SAK + + + Windows + + + Windows + + + + False + + + False + + + False + + + False + + + False + + + False + + + + + \ No newline at end of file diff --git a/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Content/Content.contentproj.vspscc b/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Content/Content.contentproj.vspscc new file mode 100644 index 0000000..feffdec --- /dev/null +++ b/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Content/Content.contentproj.vspscc @@ -0,0 +1,10 @@ +"" +{ +"FILE_VERSION" = "9237" +"ENLISTMENT_CHOICE" = "NEVER" +"PROJECT_FILE_RELATIVE_PATH" = "" +"NUMBER_OF_EXCLUDED_FILES" = "0" +"ORIGINAL_PROJECT_FILE_PATH" = "" +"NUMBER_OF_NESTED_PROJECTS" = "0" +"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER" +} diff --git a/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Nodes/HtmlBrNode.cs b/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Nodes/HtmlBrNode.cs new file mode 100644 index 0000000..3cce5cf --- /dev/null +++ b/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Nodes/HtmlBrNode.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace PlanB.Html.Nodes +{ + public class HtmlBrNode: HtmlNode + { + public override string ToString() + { + return Environment.NewLine; + } + + public HtmlBrNode() + { + Type = HtmlNodeType.Br; + } + + public override string TagName + { + get { return StaticTagName; } + } + + public static string StaticTagName + { + get { return "br"; } + } + } +} diff --git a/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Nodes/HtmlDivNode.cs b/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Nodes/HtmlDivNode.cs new file mode 100644 index 0000000..9ba6097 --- /dev/null +++ b/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Nodes/HtmlDivNode.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace PlanB.Html.Nodes +{ + public class HtmlDivNode: HtmlNode + { + public static string StaticTagName { get { return "div"; } } + public override string TagName { get { return StaticTagName; } } + } +} diff --git a/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Nodes/HtmlDocumentNode.cs b/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Nodes/HtmlDocumentNode.cs new file mode 100644 index 0000000..c3ebdce --- /dev/null +++ b/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Nodes/HtmlDocumentNode.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace PlanB.Html.Nodes +{ + public class HtmlDocumentNode: HtmlNode + { + public HtmlDocumentNode() + { + Type = HtmlNodeType.Document_; + } + + public override string InnerHtml + { + get + { + StringBuilder sb = new StringBuilder(); + + foreach (HtmlNode child in Children) + { + sb.Append(child.OuterHtml); + } + + return sb.ToString(); + } + } + + public override string OuterHtml + { + get + { + return InnerHtml; + } + } + + + + + + public override string TagName + { + get { return "_Document"; } + } + } +} diff --git a/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Nodes/HtmlImgNode.cs b/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Nodes/HtmlImgNode.cs new file mode 100644 index 0000000..5a5749f --- /dev/null +++ b/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Nodes/HtmlImgNode.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace PlanB.Html.Nodes +{ + public class HtmlImgNode: HtmlNode + { + public static string StaticTagName { get { return "img"; } } + public override string TagName { get { return StaticTagName; } } + } +} diff --git a/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Nodes/HtmlNode.cs b/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Nodes/HtmlNode.cs new file mode 100644 index 0000000..5e052fa --- /dev/null +++ b/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Nodes/HtmlNode.cs @@ -0,0 +1,191 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace PlanB.Html.Nodes +{ + public abstract class HtmlNode + { + public List Children { get; set; } + public HtmlNodeType Type { get; protected set; } + public List> Attributes { get; set; } + public List> Styles { get; set; } + + public HtmlNode() + { + Attributes = new List>(); + Children = new List(); + Styles = new List>(); + } + + public virtual String InnerHtml + { + get + { + StringBuilder sb = new StringBuilder(); + + foreach (HtmlNode childNode in Children) + { + sb.Append(childNode.OuterHtml); + } + + return sb.ToString(); + } + } + + public virtual String OuterHtml + { + get + { + string styles = GetStylesString(); + string attributes = GetAttributesString(); + + StringBuilder sb = new StringBuilder(); + + sb.Append("<"); + sb.Append(TagName); + + if (!String.IsNullOrEmpty(styles)) + { + sb.Append(" "); + sb.Append(styles); + } + + if (!String.IsNullOrEmpty(attributes)) + { + sb.Append(" "); + sb.Append(attributes); + } + + if (Children.Count > 0) + { + sb.Append(">"); + sb.Append(InnerHtml); + sb.Append(""); + } + else + { + sb.Append(" />"); + } + + return sb.ToString(); + } + } + + public abstract String TagName{get;} + + protected virtual String GetAttributesString() + { + int numAttributes = Attributes.Count; + + if (numAttributes == 0) + { + return String.Empty; + } + else if (numAttributes == 1) + { + return Attributes[0].Key + "=\"" + Attributes[0].Value + "\""; + } + else + { + StringBuilder sb = new StringBuilder(); + + sb.Append(Attributes[0].Key + "=\"" + Attributes[0].Value + "\""); + + foreach (KeyValuePair attribute in Attributes.Skip(1)) + { + sb.Append(" " + attribute.Key + "=\"" + attribute.Value + "\""); + } + + return sb.ToString(); + } + } + + protected virtual String GetStylesString() + { + int numStyles = Styles.Count; + + if (numStyles == 0) + { + return String.Empty; + } + else if (numStyles == 1) + { + return "style=\"" + Styles[0].Key + ":" + Styles[0].Value + ";\""; + } + else + { + StringBuilder sb = new StringBuilder(); + + sb.Append("style=\"" + Styles[0].Key + ":" + Styles[0].Value + ";\""); + + foreach (KeyValuePair style in Styles.Skip(1)) + { + sb.Append(";" + style.Key + ":" + style.Value); + } + + sb.Append("\""); + + return sb.ToString(); + } + } + + public void AddAttribute(KeyValuePair attribute) + { + KeyValuePair newAttribute = new KeyValuePair(attribute.Key.ToLower(), attribute.Value); + + if (newAttribute.Key == "style") + { + ClearStyles(); + String styleString = newAttribute.Value; + string[] stylePairStrings = styleString.Split(new char[] { ';' }); + KeyValuePair style; + + foreach (string stylePairString in stylePairStrings) + { + string[] temp = stylePairString.Split(new char[] { ':' }); + if (temp.Length == 1) + { + style = new KeyValuePair(temp[0], String.Empty); + } + else if (temp.Length >= 2) + { + style = new KeyValuePair(temp[0], temp[1]); + } + else + { + style = new KeyValuePair(); + } + + if (!String.IsNullOrEmpty(style.Key)) + { + AddStyle(style); + } + } + } + else + { + Attributes.RemoveAll(i => i.Key == newAttribute.Key); + Attributes.Add(newAttribute); + } + } + + private void ClearStyles() + { + Styles.Clear(); + } + + public void AddStyle(KeyValuePair style) + { + KeyValuePair newStyle = new KeyValuePair(style.Key.ToLower(), style.Value); + + Styles.RemoveAll(i => i.Key == newStyle.Key); + Styles.Add(newStyle); + } + } + + public enum HtmlNodeType { Document_, Text_, Br, Span, Img, Paragraph, Div } +} diff --git a/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Nodes/HtmlSpanNode.cs b/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Nodes/HtmlSpanNode.cs new file mode 100644 index 0000000..b11dc5d --- /dev/null +++ b/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Nodes/HtmlSpanNode.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace PlanB.Html.Nodes +{ + public class HtmlSpanNode: HtmlNode + { + public HtmlSpanNode() + { + Type = HtmlNodeType.Span; + } + + public HtmlSpanNode(String text) + :this() + { + Children.Add(new HtmlTextNode(text)); + } + + public HtmlSpanNode(IEnumerable children) + :this() + { + foreach (HtmlNode child in children) + { + Children.Add(child); + } + } + + public override string TagName + { + get { return StaticTagName; } + } + + public static string StaticTagName { get { return "span"; } } + } +} diff --git a/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Nodes/HtmlTextNode.cs b/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Nodes/HtmlTextNode.cs new file mode 100644 index 0000000..137199b --- /dev/null +++ b/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Nodes/HtmlTextNode.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.RegularExpressions; + +namespace PlanB.Html.Nodes +{ + public class HtmlTextNode: HtmlNode + { + public String Text { get; set; } + public override string ToString() + { + return Text; + } + + public HtmlTextNode() + { + Text = String.Empty; + Type = HtmlNodeType.Text_; + } + + public HtmlTextNode(String text) + { + Text = text; + Type = HtmlNodeType.Text_; + } + + public override string InnerHtml + { + get + { + return String.Empty; + } + } + + public override string OuterHtml + { + get + { + return Entitize(Text); + } + } + + public override string TagName + { + get { return "_Text"; } + } + + private string Entitize(string Text) + { + string temp = Text; + + temp = temp.Replace("&", "&"); + temp = temp.Replace("<", "<"); + temp = temp.Replace(">", ">"); + temp = temp.Replace("\"", """); + + return temp; + } + } +} diff --git a/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Parser.cs b/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Parser.cs new file mode 100644 index 0000000..2f10aa5 --- /dev/null +++ b/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Parser.cs @@ -0,0 +1,289 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Audio; +using Microsoft.Xna.Framework.Content; +using Microsoft.Xna.Framework.GamerServices; +using Microsoft.Xna.Framework.Graphics; +using Microsoft.Xna.Framework.Input; +using Microsoft.Xna.Framework.Media; +using Microsoft.Xna.Framework.Net; +using Microsoft.Xna.Framework.Storage; +using PlanB.Html.Nodes; +using System.Text; +using PlanB.Html.Tokens; +using System.Text.RegularExpressions; + +namespace PlanB.Html +{ + public class Parser + { + public static List Tokenize(string htmlText) + { + List tokens = new List(); + + int position = 0; + int startOfNextToken = htmlText.IndexOf("<"); + + //If the whole document is text then just create one HtmlTextToken + if (startOfNextToken == -1) + { + tokens.Add(new HtmlTextToken(htmlText)); + return tokens; + } + + while (startOfNextToken >= 0) + { + if (startOfNextToken > position) + { + tokens.Add(new HtmlTextToken(htmlText.Substring(position, startOfNextToken - position))); + } + + //Identify the type of token we are aproaching + string tokenText = htmlText.Substring(startOfNextToken); + string tokenName = String.Empty; + Regex r = new Regex(@"<(?/?\w+)((\s+)(?\w*)=\""(?[^""]*)\"")*(\s*)(/)?(\s*)>"); + r = new Regex(@"<(?/?\w+)(((\s+((?\w+)=(""(?[^""]*)""))\s*))|((\s+((?\w+)=('(?[^']*)'))\s*))|((\s+((?\w+)=(?[^\s>]*))\s*)))*\s*(/)?(\s*)>"); + Match m = r.Match(tokenText); + Console.WriteLine(m.ToString()); + tokenName = m.Groups["tagName"].Value; + + if (tokenName == HtmlSpanNode.StaticTagName)//"span" + { + //TODO: Handle attributes + HtmlBeginSpanToken token = new HtmlBeginSpanToken(); + token.AddAttributes(m); + tokens.Add(token); + + position = htmlText.IndexOf(">", startOfNextToken) + 1; + startOfNextToken = htmlText.IndexOf("<", position); + } + else if (tokenName == "/" + HtmlSpanNode.StaticTagName)//"/span" + { + tokens.Add(new HtmlEndSpanToken()); + + position = htmlText.IndexOf(">", startOfNextToken) + 1; + startOfNextToken = htmlText.IndexOf("<", position); + } + else if (tokenName == HtmlBrNode.StaticTagName)//"br" + { + HtmlBrToken token = new HtmlBrToken(); + token.AddAttributes(m); + tokens.Add(token); + + position = htmlText.IndexOf(">", startOfNextToken) + 1; + startOfNextToken = htmlText.IndexOf("<", position); + } + else if(tokenName == HtmlDivNode.StaticTagName)//"div" + { + HtmlBeginDivToken token = new HtmlBeginDivToken(); + + token.AddAttributes(m); + tokens.Add(token); + + position = htmlText.IndexOf(">", startOfNextToken) + 1; + startOfNextToken = htmlText.IndexOf("<", position); + } + else if (tokenName == "/" + HtmlDivNode.StaticTagName)//"/div" + { + tokens.Add(new HtmlEndDivToken()); + + position = htmlText.IndexOf(">", startOfNextToken) + 1; + startOfNextToken = htmlText.IndexOf("<", position); + } + else if (tokenName == HtmlImgNode.StaticTagName)//"img" + { + HtmlImgToken token = new HtmlImgToken(); + + token.AddAttributes(m); + tokens.Add(token); + + position = htmlText.IndexOf(">", startOfNextToken) + 1; + startOfNextToken = htmlText.IndexOf("<", position); + } + else + { + position = startOfNextToken; + startOfNextToken = htmlText.IndexOf("<", startOfNextToken + 1); + + } + + } + + if (htmlText.Length - 1 > position) + { + tokens.Add(new HtmlTextToken(htmlText.Substring(position))); + } + + return tokens; + } + + public static HtmlNode Parse(List tokens) + { + HtmlNode rootNode = new HtmlDocumentNode(); + + int position = 0; + + GetContents(rootNode, tokens, ref position); + + return rootNode; + } + + private static void GetContents(HtmlNode parentNode, List tokens, ref int position) + { + HtmlToken currentToken; + bool throwExceptions = false; + + HtmlTextToken textToken = null; + HtmlBrToken brToken = null; + HtmlBeginSpanToken beginSpanToken = null; + HtmlEndSpanToken endSpanToken = null; + HtmlBeginDivToken beginDivToken = null; + HtmlEndDivToken endDivToken = null; + HtmlImgToken imgToken = null; + + currentToken = tokens[position]; + + while (currentToken != null) + { + textToken = currentToken as HtmlTextToken; + brToken = currentToken as HtmlBrToken; + beginSpanToken = currentToken as HtmlBeginSpanToken; + endSpanToken = currentToken as HtmlEndSpanToken; + beginDivToken = currentToken as HtmlBeginDivToken; + endDivToken = currentToken as HtmlEndDivToken; + imgToken = currentToken as HtmlImgToken; + + if (textToken != null) + { + HtmlTextNode textNode = new HtmlTextNode(); + textNode.Text = textToken.Text; + position++; + + while (tokens.Count > position && (textToken = tokens[position] as HtmlTextToken) != null) + { + textNode.Text += textToken.Text; + position++; + } + + parentNode.Children.Add(textNode); + } + else if (beginSpanToken != null) + { + HtmlSpanNode spanNode = new HtmlSpanNode(); + position++; + GetAttributes(spanNode, beginSpanToken); + GetContents(spanNode, tokens, ref position); + if (tokens.Count < position || tokens[position] as HtmlEndSpanToken == null) + { + if (throwExceptions) + { + throw new Exception("Missing end span tag"); + } + } + parentNode.Children.Add(spanNode); + position++; + } + else if (endSpanToken != null) + { + if (parentNode.GetType() == typeof(HtmlSpanNode)) + { + return; + } + else + { + if (throwExceptions) + { + throw new Exception("Encountered closing span tag without matching open tag."); + } + else + { + position++; + } + } + } + else if (beginDivToken != null) + { + HtmlDivNode divNode = new HtmlDivNode(); + position++; + GetAttributes(divNode, beginDivToken); + GetContents(divNode, tokens, ref position); + if (tokens.Count <= position || tokens[position] as HtmlEndDivToken == null) + { + if (throwExceptions) + { + throw new Exception("Missing end div tag"); + } + } + parentNode.Children.Add(divNode); + position++; + } + else if (endDivToken != null) + { + if (parentNode.GetType() == typeof(HtmlDivNode)) + { + return; + } + else + { + if (throwExceptions) + { + throw new Exception("Encountered closing div tag without matching open tag."); + } + else + { + position++; + } + } + } + else if (brToken != null) + { + HtmlBrNode brNode = new HtmlBrNode(); + GetAttributes(brNode, brToken); + parentNode.Children.Add(brNode); + + position++; + } + else if (imgToken != null) + { + HtmlImgNode imgNode = new HtmlImgNode(); + GetAttributes(imgNode, imgToken); + parentNode.Children.Add(imgNode); + + position++; + } + else + { + position++; + } + + if (tokens.Count > position) + { + currentToken = tokens[position]; + } + else + { + return; + } + } + } + + private static void GetAttributes(HtmlNode htmlNode, HtmlToken htmlToken) + { + + foreach (KeyValuePair kvp in htmlToken.Attributes) + { + htmlNode.AddAttribute(kvp); + } + } + + public static HtmlNode Parse(string text) + { + List tokens = Tokenize(text); + HtmlNode rootNode = Parse(tokens); + return rootNode; + //return Parse(Tokenize(text)); + } + } +} diff --git a/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Plan B Html Parser.csproj b/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Plan B Html Parser.csproj new file mode 100644 index 0000000..37b82f4 --- /dev/null +++ b/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Plan B Html Parser.csproj @@ -0,0 +1,149 @@ + + + {A6FA0455-ACB5-4E80-9E58-6B79976AA717} + {6D335F3A-9D43-41b4-9D22-F6F17C4BE596};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + Debug + x86 + Library + Properties + PlanB.Html + Plan B Html Parser + v3.5 + v3.1 + Windows + 1aed1ad2-9777-46c5-92fe-ef987622475f + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + SAK + SAK + SAK + SAK + + + true + full + false + bin\x86\Debug + DEBUG;TRACE;WINDOWS + prompt + 4 + true + false + x86 + false + + + pdbonly + true + bin\x86\Release + TRACE;WINDOWS + prompt + 4 + true + false + x86 + true + + + + False + True + + + False + True + + + False + + + False + + + + False + + + 3.5 + False + + + 3.5 + False + + + + + + + + + + + + + + + + + + + + + + + + 730f03d9-cb96-43a9-88e3-a8687a66cf5e + False + + + + + False + .NET Framework 2.0 %28x86%29 + false + + + False + .NET Framework 3.0 %28x86%29 + false + + + False + .NET Framework 3.5 + true + + + False + Windows Installer 3.1 + true + + + False + Microsoft XNA Framework Redistributable 3.1 + true + + + + + + \ No newline at end of file diff --git a/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Plan B Html Parser.csproj.vspscc b/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Plan B Html Parser.csproj.vspscc new file mode 100644 index 0000000..6e309a6 --- /dev/null +++ b/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Plan B Html Parser.csproj.vspscc @@ -0,0 +1,10 @@ +"" +{ +"FILE_VERSION" = "9237" +"ENLISTMENT_CHOICE" = "NEVER" +"PROJECT_FILE_RELATIVE_PATH" = "" +"NUMBER_OF_EXCLUDED_FILES" = "0" +"ORIGINAL_PROJECT_FILE_PATH" = "" +"NUMBER_OF_NESTED_PROJECTS" = "1" +"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER" +} diff --git a/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Properties/AssemblyInfo.cs b/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..4b3dcc0 --- /dev/null +++ b/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Properties/AssemblyInfo.cs @@ -0,0 +1,31 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Plan B Html Parser")] +[assembly: AssemblyProduct("Plan B Html Parser")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("b8545a1e-c024-4eec-9d5e-a3e470e43671")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +[assembly: AssemblyVersion("1.0.0.0")] diff --git a/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Tokens/HtmlBeginDivToken.cs b/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Tokens/HtmlBeginDivToken.cs new file mode 100644 index 0000000..eb22fda --- /dev/null +++ b/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Tokens/HtmlBeginDivToken.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace PlanB.Html.Tokens +{ + public class HtmlBeginDivToken:HtmlToken + { + } +} diff --git a/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Tokens/HtmlBeginSpanToken.cs b/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Tokens/HtmlBeginSpanToken.cs new file mode 100644 index 0000000..8b51111 --- /dev/null +++ b/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Tokens/HtmlBeginSpanToken.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace PlanB.Html.Tokens +{ + public class HtmlBeginSpanToken: HtmlToken + { + public override string ToString() + { + return ""; + } + } +} diff --git a/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Tokens/HtmlBrToken.cs b/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Tokens/HtmlBrToken.cs new file mode 100644 index 0000000..c0505a0 --- /dev/null +++ b/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Tokens/HtmlBrToken.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace PlanB.Html.Tokens +{ + public class HtmlBrToken: HtmlToken + { + public override string ToString() + { + return "
"; + } + } +} diff --git a/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Tokens/HtmlEndDivToken.cs b/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Tokens/HtmlEndDivToken.cs new file mode 100644 index 0000000..228421f --- /dev/null +++ b/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Tokens/HtmlEndDivToken.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace PlanB.Html.Tokens +{ + public class HtmlEndDivToken: HtmlToken + { + } +} diff --git a/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Tokens/HtmlEndSpanToken.cs b/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Tokens/HtmlEndSpanToken.cs new file mode 100644 index 0000000..698c49f --- /dev/null +++ b/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Tokens/HtmlEndSpanToken.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace PlanB.Html.Tokens +{ + public class HtmlEndSpanToken: HtmlToken + { + public override string ToString() + { + return "
"; + } + } +} diff --git a/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Tokens/HtmlImgToken.cs b/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Tokens/HtmlImgToken.cs new file mode 100644 index 0000000..d761c3d --- /dev/null +++ b/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Tokens/HtmlImgToken.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace PlanB.Html.Tokens +{ + public class HtmlImgToken: HtmlToken + { + } +} diff --git a/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Tokens/HtmlTextToken.cs b/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Tokens/HtmlTextToken.cs new file mode 100644 index 0000000..b0f2f22 --- /dev/null +++ b/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Tokens/HtmlTextToken.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace PlanB.Html.Tokens +{ + public class HtmlTextToken: HtmlToken + { + public string Text { get; set; } + + public HtmlTextToken() + { + Text = String.Empty; + } + + public HtmlTextToken(string str) + { + Text = str; + } + + public override string ToString() + { + return Text ?? String.Empty; + } + } +} diff --git a/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Tokens/HtmlToken.cs b/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Tokens/HtmlToken.cs new file mode 100644 index 0000000..5e4c93f --- /dev/null +++ b/Plan B Html Parser (XNA 3.1)/Plan B Html Parser/Tokens/HtmlToken.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.RegularExpressions; + +namespace PlanB.Html.Tokens +{ + public class HtmlToken + { + public List> Attributes { get; set; } + + public HtmlToken() + { + Attributes = new List>(); + } + + public override string ToString() + { + return String.Empty; + } + + internal void AddAttributes(Match m) + { + Group attributeNameGroup = m.Groups["attributeName"]; + Group attributeValueGroup = m.Groups["attributeValue"]; + + //int numAttributes = m.Groups["attributeName"].Captures.Count; + int numAttributes = attributeNameGroup.Captures.Count; + + for (int i = 0; i < numAttributes; i++) + { + //KeyValuePair attribute = new KeyValuePair(m.Groups["attributeName"].Captures[i].ToString(), m.Groups["attributeValue"].Captures[i].ToString()); + KeyValuePair attribute = new KeyValuePair(attributeNameGroup.Captures[i].ToString(), attributeValueGroup.Captures[i].ToString()); + Attributes.Add(attribute); + } + } + } +} diff --git a/Plan B Html Parser (XNA 3.1)/TestProject1/AuthoringTests.txt b/Plan B Html Parser (XNA 3.1)/TestProject1/AuthoringTests.txt new file mode 100644 index 0000000..64bab94 --- /dev/null +++ b/Plan B Html Parser (XNA 3.1)/TestProject1/AuthoringTests.txt @@ -0,0 +1,136 @@ +========================================================================== + Visual Studio Team System: Overview of Authoring and Running Tests +========================================================================== + +This overview describes the features for authoring and running tests in +Visual Studio Team System and Visual Studio Team Edition for Software Testers. + +Opening Tests +------------- +To open a test, open a test project or a test metadata file (a file with +extension .vsmdi) that contains the definition of the test. You can find +test projects and metadata files in Solution Explorer. + +Viewing Tests +------------- +To see which tests are available to you, open the Test View window. Or, +if you have installed Team Edition for Software Testers, you can also open +the Test List Editor window to view tests. + +To open the Test View window, click the Test menu, point to Windows, and +then click Test View. To open the Test List Editor window (if you have +installed Team Edition for Software Testers), click Test, point to Windows, +and then click Test List Editor. + +Running Tests +------------- +You can run tests from the Test View window and the Test List Editor window. +See Viewing Tests to learn how to open these windows. To run one or more +tests displayed in the Test View window, first select the tests in that +window; to select multiple tests, hold either the Shift or CTRL key while +clicking tests. Then click the Run Tests button in the Test View window +toolbar. + +If you have installed Visual Studio Team Edition for Software Testers, you can +also use the Test List Editor window to run tests. To run tests in Test List Editor, +select the check box next to each test that you want to run. Then click the +Run Tests button in the Test List Editor window toolbar. + +Viewing Test Results +-------------------- +When you run a test or a series of tests, the results of the test run will be +shown in the Test Results window. Each individual test in the run is shown on +a separate line so that you can see its status. The window contains an +embedded status bar in the top half of the window that provides you with +summary details of the complete test run. + +To see more detailed results for a particular test result, double-click it in +the Test Results window. This opens a window that provides more information +about the particular test result, such as any specific error messages returned +by the test. + +Changing the way that tests are run +----------------------------------- +Each time you run one or more tests, a collection of settings is used to +determine how those tests are run. These settings are contained in a “test +run configuration” file. + +Here is a partial list of the changes you can make with a test run +configuration file: + + - Change the naming scheme for each test run. + - Change the test controller that the tests are run on so that you can run + tests remotely. + - Gather code coverage data for the code being tested so that you can see + which lines of code are covered by your tests. + - Enable and disable test deployment. + - Specify additional files to deploy before tests are run. + - Select a different host, ASP.NET, for running ASP.NET unit tests. + - Select a different host, the smart device test host, for running smart device unit tests. + - Set various properties for the test agents that run your tests. + - Run custom scripts at the start and end of each test run so that you can + set up the test environment exactly as required each time tests are run. + - Set time limits for tests and test runs. + - Set the browser mix and the number of times to repeat Web tests in the + test run. + +By default, a test run configuration file is created whenever you create a +new test project. You make changes to this file by double-clicking it in +Solution Explorer and then changing its settings. (Test run configuration +files have the extension .testrunconfig.) + +A solution can contain multiple test run configuration files. Only one of +those files, known as the “Active” test run configuration file, is used to +determine the settings that are currently used for test runs. You select +the active test run configuration by clicking Select Active Test Run +Configuration on the Test menu. + +------------------------------------------------------------------------------- + +Test Types +---------- +Using Visual Studio Team Edition for Software Testers, you can create a number +of different test types: + +Unit test: Use a unit test to create a programmatic test in C++, Visual C# or +Visual Basic that exercises source code. A unit test calls the methods of a +class, passing suitable parameters, and verifies that the returned value is +what you expect. +There are three specialized variants of unit tests: + - Data-driven unit tests are created when you configure a unit test to be + called repeatedly for each row of a data source. The data from each row + is used by the unit test as input data. + - ASP.NET unit tests are unit tests that exercise code in an ASP.NET Web + application. + - Smart device unit tests are unit tests that are deployed to a smart device + or emulator and then executed by the smart device test host. + +Web Test: Web tests consist of an ordered series of HTTP requests that you +record in a browser session using Microsoft Internet Explorer. You can have +the test report specific details about the pages or sites it requests, such +as whether a particular page contains a specified string. + +Load Test: You use a load test to encapsulate non-manual tests, such as +unit, Web, and generic tests, and then run them simultaneously by using +virtual users. Running these tests under load generates test results, +including performance and other counters, in tables and in graphs. + +Generic test: A generic test is an existing program wrapped to function as a +test in Visual Studio. The following are examples of tests or programs that +you can turn into generic tests: + - An existing test that uses process exit codes to communicate whether the + test passed or failed. 0 indicates passing and any other value indicates + a failure. + - A general program to obtain specific functionality during a test scenario. + - A test or program that uses a special XML file (called a “summary results + file”), to communicate detailed results. + +Manual test: The manual test type is used when the test tasks are to be +completed by a test engineer as opposed to an automated script. + +Ordered test: Use an ordered test to execute a set of tests in an order you +specify. + +------------------------------------------------------------------------------- + + diff --git a/Plan B Html Parser (XNA 3.1)/TestProject1/ParseErrorTests.cs b/Plan B Html Parser (XNA 3.1)/TestProject1/ParseErrorTests.cs new file mode 100644 index 0000000..398dce9 --- /dev/null +++ b/Plan B Html Parser (XNA 3.1)/TestProject1/ParseErrorTests.cs @@ -0,0 +1,178 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using PlanB.Html.Nodes; +using PlanB.Html; + +namespace TestProject1 +{ + [TestClass] + public class ParseErrorTests + { + public ParseErrorTests() + { + // + // TODO: Add constructor logic here + // + } + + private TestContext testContextInstance; + + /// + ///Gets or sets the test context which provides + ///information about and functionality for the current test run. + /// + public TestContext TestContext + { + get + { + return testContextInstance; + } + set + { + testContextInstance = value; + } + } + + #region Additional test attributes + // + // You can use the following additional attributes as you write your tests: + // + // Use ClassInitialize to run code before running the first test in the class + // [ClassInitialize()] + // public static void MyClassInitialize(TestContext testContext) { } + // + // Use ClassCleanup to run code after all tests in a class have run + // [ClassCleanup()] + // public static void MyClassCleanup() { } + // + // Use TestInitialize to run code before running each test + // [TestInitialize()] + // public void MyTestInitialize() { } + // + // Use TestCleanup to run code after each test has run + // [TestCleanup()] + // public void MyTestCleanup() { } + // + #endregion + + [TestMethod] + public void Test_Parse_UnknownTag() + { + String htmlText = ""; + String expectedResult = "<asdf></asdf>"; + + HtmlNode htmlNode = Parser.Parse(htmlText); + + Assert.IsNotNull(htmlNode, "The HtmlNode returned by the parser is null."); + + Assert.AreEqual(htmlNode.Children.Count, 1); + + Assert.IsInstanceOfType(htmlNode.Children[0], typeof(HtmlTextNode)); + + Assert.AreEqual(htmlNode.Children[0].Children.Count, 0); + + Assert.AreEqual(expectedResult, htmlNode.InnerHtml); + } + + [TestMethod] + public void Test_Parse_UnclosedTag() + { + String htmlText = "
asdffdsajkl;"; + String expectedResult = "
asdffdsajkl;
"; + + HtmlNode htmlNode = Parser.Parse(htmlText); + + Assert.IsNotNull(htmlNode, "The HtmlNode returned by the parser is null."); + + Assert.IsInstanceOfType(htmlNode.Children[0], typeof(HtmlDivNode)); + + Assert.AreEqual(expectedResult, htmlNode.InnerHtml); + } + + [TestMethod] + public void Test_Parse_UnescapedAmpersand() + { + String htmlText = "hello&world"; + String expectedResult = "hello&world"; + + HtmlNode htmlNode = Parser.Parse(htmlText); + + Assert.IsNotNull(htmlNode); + + Assert.AreEqual(expectedResult, htmlNode.InnerHtml); + } + + [TestMethod] + public void Test_Parse_UnescapedLessThan() + { + String htmlText = "hello(expectedResult, htmlNode.InnerHtml); + } + + [TestMethod] + public void Test_Parse_UnescapedLessThanThatLooksLikeATag() + { + String htmlText = "hello
(expectedResult, htmlNode.InnerHtml); + } + + [TestMethod] + public void Test_Parse_UnescapedGreaterThan() + { + String htmlText = "hello>world"; + String expectedResult = "hello>world"; + + HtmlNode htmlNode = Parser.Parse(htmlText); + + Assert.IsNotNull(htmlNode); + + Assert.AreEqual(expectedResult, htmlNode.InnerHtml); + + } + + [TestMethod] + public void Test_Parse_UnescapedQuote() + { + String htmlText = "hello\"world"; + String expectedResult = "hello"world"; + + HtmlNode htmlNode = Parser.Parse(htmlText); + + Assert.IsNotNull(htmlNode); + + Assert.IsInstanceOfType(htmlNode.Children[0], typeof(HtmlTextNode)); + + Assert.AreEqual(expectedResult, htmlNode.InnerHtml); + } + + [TestMethod] + public void Test_Parse_UnopenedTag() + { + String htmlText = "
hello world
"; + String expectedResult = "
hello world
"; + + HtmlNode htmlNode = Parser.Parse(htmlText); + + Assert.IsNotNull(htmlNode); + + Assert.IsInstanceOfType(htmlNode.Children[0], typeof(HtmlDivNode)); + + Assert.AreEqual(expectedResult, htmlNode.InnerHtml); + } + } +} diff --git a/Plan B Html Parser (XNA 3.1)/TestProject1/ParseTests.cs b/Plan B Html Parser (XNA 3.1)/TestProject1/ParseTests.cs new file mode 100644 index 0000000..d54c2be --- /dev/null +++ b/Plan B Html Parser (XNA 3.1)/TestProject1/ParseTests.cs @@ -0,0 +1,346 @@ +using System; +using System.Text; +using System.Collections.Generic; +using System.Linq; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using PlanB.Html.Nodes; +using PlanB.Html; + +namespace TestProject1 +{ + /// + /// Summary description for UnitTest1 + /// + [TestClass] + public class ParseTests + { + public ParseTests() + { + // + // TODO: Add constructor logic here + // + } + + private TestContext testContextInstance; + + /// + ///Gets or sets the test context which provides + ///information about and functionality for the current test run. + /// + public TestContext TestContext + { + get + { + return testContextInstance; + } + set + { + testContextInstance = value; + } + } + + #region Additional test attributes + // + // You can use the following additional attributes as you write your tests: + // + // Use ClassInitialize to run code before running the first test in the class + // [ClassInitialize()] + // public static void MyClassInitialize(TestContext testContext) { } + // + // Use ClassCleanup to run code after all tests in a class have run + // [ClassCleanup()] + // public static void MyClassCleanup() { } + // + // Use TestInitialize to run code before running each test + // [TestInitialize()] + // public void MyTestInitialize() { } + // + // Use TestCleanup to run code after each test has run + // [TestCleanup()] + // public void MyTestCleanup() { } + // + #endregion + + [TestMethod] + public void Test_Parse_HtmlTextNode() + { + String htmlText = "asdf"; + String expectedResult = "asdf"; + + HtmlNode htmlNode = Parser.Parse(htmlText); + + Assert.IsNotNull(htmlNode, "The HtmlNode returned by the parser is null."); + + Assert.AreEqual(htmlNode.Children.Count, 1); + + Assert.IsInstanceOfType(htmlNode.Children[0], typeof(HtmlTextNode)); + + HtmlTextNode htmlTextNode = htmlNode.Children[0] as HtmlTextNode; + + Assert.AreEqual(expectedResult, htmlTextNode.Text); + } + + [TestMethod] + public void Test_Parse_Returns_HtmlDocumentNode() + { + String htmlText = String.Empty; + + HtmlNode htmlNode = Parser.Parse(htmlText); + + Assert.IsInstanceOfType(htmlNode, typeof(HtmlDocumentNode)); + } + + [TestMethod] + public void Test_HtmlTextNode_Constructors() + { + HtmlTextNode htmlTextNode = new HtmlTextNode(); + + Assert.IsNotNull(htmlTextNode.Attributes, "The default constructor failed to initialize the Attributes property."); + Assert.IsNotNull(htmlTextNode.Children, "The default constructor failed to initialize the Children property."); + Assert.IsNotNull(htmlTextNode.InnerHtml, "The default constructor failed to initialize the InnerHtml property."); + Assert.IsNotNull(htmlTextNode.OuterHtml, "The default constructor failed to initialize the OuterHtml property."); + Assert.IsNotNull(htmlTextNode.Text, "The default constructor failed to initialize the Text property"); + Assert.IsNotNull(htmlTextNode.Type, "The default constructor failed to initialize the Type property"); + Assert.AreEqual(HtmlNodeType.Text_, htmlTextNode.Type); + + String expectedValue = "This is some sample text."; + htmlTextNode = new HtmlTextNode(expectedValue); + Assert.IsNotNull(htmlTextNode.Attributes, "The HtmlTextNode(string) constructor failed to initialize the Attributes property."); + Assert.IsNotNull(htmlTextNode.Children, "The HtmlTextNode(string) constructor failed to initialize the Children property."); + Assert.IsNotNull(htmlTextNode.InnerHtml, "The HtmlTextNode(string) constructor failed to initialize the InnerHtml property."); + Assert.AreEqual(String.Empty, htmlTextNode.InnerHtml); + Assert.IsNotNull(htmlTextNode.OuterHtml, "The HtmlTextNode(string) constructor failed to initialize the OuterHtml property."); + Assert.AreEqual(expectedValue, htmlTextNode.OuterHtml); + Assert.IsNotNull(htmlTextNode.Text, "The HtmlTextNode(string) constructor failed to initialize the Text property"); + Assert.AreEqual(expectedValue, htmlTextNode.Text); + Assert.IsNotNull(htmlTextNode.Type, "The HtmlTextNode(string) constructor failed to initialize the Type property"); + Assert.AreEqual(HtmlNodeType.Text_, htmlTextNode.Type); + } + + [TestMethod] + public void Test_HtmlDocumentNode_Constructors() + { + HtmlDocumentNode htmlDocumentNode = new HtmlDocumentNode(); + Assert.IsNotNull(htmlDocumentNode.Attributes); + Assert.IsNotNull(htmlDocumentNode.Children); + Assert.AreEqual(0, htmlDocumentNode.Children.Count); + Assert.IsNotNull(htmlDocumentNode.InnerHtml); + Assert.AreEqual(String.Empty, htmlDocumentNode.InnerHtml); + Assert.IsNotNull(htmlDocumentNode.OuterHtml); + Assert.AreEqual(String.Empty, htmlDocumentNode.OuterHtml); + Assert.IsNotNull(htmlDocumentNode.Type); + Assert.AreEqual(HtmlNodeType.Document_, htmlDocumentNode.Type); + } + + [TestMethod] + public void Test_HtmlBrNode_Constructor() + { + HtmlBrNode htmlBrNode = new HtmlBrNode(); + String expectedOuterHtml = "
"; + + Assert.IsNotNull(htmlBrNode.Attributes, "The default constructor failed to initialize the Attributes property."); + Assert.AreEqual(0, htmlBrNode.Attributes.Count); + Assert.IsNotNull(htmlBrNode.Children, "The default constructor failed to initialize the Children property."); + Assert.AreEqual(0, htmlBrNode.Children.Count); + Assert.IsNotNull(htmlBrNode.InnerHtml, "The default constructor failed to initialize the InnerHtml property."); + Assert.AreEqual(htmlBrNode.InnerHtml, String.Empty); + Assert.IsNotNull(htmlBrNode.OuterHtml, "The default constructor failed to initialize the OuterHtml property."); + Assert.AreEqual(htmlBrNode.OuterHtml, expectedOuterHtml); + Assert.IsNotNull(htmlBrNode.Type, "The default constructor failed to initialize the Type property"); + Assert.AreEqual(HtmlNodeType.Br, htmlBrNode.Type); + } + + [TestMethod] + public void Test_HtmlSpanNode_Constructor() + { + + //Default constructor + HtmlSpanNode htmlSpanNode = new HtmlSpanNode(); + Assert.IsNotNull(htmlSpanNode.Attributes, "The default constructor failed to initialize the Attributes property."); + Assert.AreEqual(0, htmlSpanNode.Attributes.Count); + Assert.IsNotNull(htmlSpanNode.Children, "The default constructor failed to initialize the Children property."); + Assert.AreEqual(0, htmlSpanNode.Children.Count); + Assert.IsNotNull(htmlSpanNode.InnerHtml, "The default constructor failed to initialize the InnerHtml property."); + Assert.AreEqual(String.Empty, htmlSpanNode.InnerHtml); + Assert.IsNotNull(htmlSpanNode.OuterHtml, "The default constructor failed to initialize the OuterHtml property."); + Assert.AreEqual("", htmlSpanNode.OuterHtml); + Assert.IsNotNull(htmlSpanNode.Type, "The default constructor failed to initialize the Type property"); + Assert.AreEqual(HtmlNodeType.Span, htmlSpanNode.Type); + + //HtmlSpanNode(String) + String text = "test"; + htmlSpanNode = new HtmlSpanNode(text); + Assert.IsNotNull(htmlSpanNode.Attributes, "The HtmlSpanNode(String) constructor failed to initialize the Attributes property."); + Assert.AreEqual(0, htmlSpanNode.Attributes.Count); + Assert.IsNotNull(htmlSpanNode.Children, "The HtmlSpanNode(String) constructor failed to initialize the Children property."); + Assert.AreEqual(1, htmlSpanNode.Children.Count); + Assert.IsNotNull(htmlSpanNode.InnerHtml, "The HtmlSpanNode(String) constructor failed to initialize the InnerHtml property."); + Assert.AreEqual(text, htmlSpanNode.InnerHtml); + Assert.IsNotNull(htmlSpanNode.OuterHtml, "The HtmlSpanNode(String) constructor failed to initialize the OuterHtml property."); + Assert.AreEqual("" + text + "", htmlSpanNode.OuterHtml); + Assert.IsNotNull(htmlSpanNode.Type, "The HtmlSpanNode(String) constructor failed to initialize the Type property"); + Assert.AreEqual(HtmlNodeType.Span, htmlSpanNode.Type); + + //HtmlSpanNode(IEnumerable) + htmlSpanNode = new HtmlSpanNode(new HtmlNode[] { new HtmlTextNode(text), new HtmlBrNode(), new HtmlTextNode(text) }); + Assert.IsNotNull(htmlSpanNode.Attributes, "The HtmlSpanNode(IEnumerable) constructor failed to initialize the Attributes property."); + Assert.AreEqual(0, htmlSpanNode.Attributes.Count); + Assert.IsNotNull(htmlSpanNode.Children, "The HtmlSpanNode(IEnumerable) constructor failed to initialize the Children property."); + Assert.AreEqual(3, htmlSpanNode.Children.Count); + Assert.IsNotNull(htmlSpanNode.InnerHtml, "The HtmlSpanNode(IEnumerable) constructor failed to initialize the InnerHtml property."); + Assert.AreEqual(text + "
" + text, htmlSpanNode.InnerHtml); + Assert.IsNotNull(htmlSpanNode.OuterHtml, "The HtmlSpanNode(IEnumerable) constructor failed to initialize the OuterHtml property."); + Assert.AreEqual("" + text + "
" + text + "
", htmlSpanNode.OuterHtml); + Assert.IsNotNull(htmlSpanNode.Type, "The HtmlSpanNode(IEnumerable) constructor failed to initialize the Type property"); + Assert.AreEqual(HtmlNodeType.Span, htmlSpanNode.Type); + } + + [TestMethod] + public void Test_Parse_TextWithSpanTag() + { + String htmlText = "asdf123fdsa"; + String expectedFirstNodeOuterHtml = "asdf"; + String expectedSecondNodeOuterHtml = "123"; + String expectedThirdNodeOuterHtml = "fdsa"; + String expectedSecondNodeInnerHtml = "123"; + + HtmlNode htmlNode = Parser.Parse(htmlText); + + Assert.IsNotNull(htmlNode, ""); + Assert.IsInstanceOfType(htmlNode, typeof(HtmlDocumentNode)); + Assert.AreEqual(htmlText, htmlNode.OuterHtml); + Assert.AreEqual(3, htmlNode.Children.Count); + + Assert.IsInstanceOfType(htmlNode.Children[0], typeof(HtmlTextNode)); + Assert.AreEqual(expectedFirstNodeOuterHtml, htmlNode.Children[0].OuterHtml); + Assert.AreEqual(0, htmlNode.Children[0].Children.Count); + + Assert.IsInstanceOfType(htmlNode.Children[1], typeof(HtmlSpanNode)); + Assert.AreEqual(expectedSecondNodeOuterHtml, htmlNode.Children[1].OuterHtml); + Assert.AreEqual(1, htmlNode.Children[1].Children.Count); + + Assert.IsInstanceOfType(htmlNode.Children[1].Children[0], typeof(HtmlTextNode)); + Assert.AreEqual(expectedSecondNodeInnerHtml, htmlNode.Children[1].Children[0].OuterHtml); + Assert.AreEqual(0, htmlNode.Children[1].Children[0].Children.Count); + + Assert.IsInstanceOfType(htmlNode.Children[2], typeof(HtmlTextNode)); + Assert.AreEqual(expectedThirdNodeOuterHtml, htmlNode.Children[2].OuterHtml); + Assert.AreEqual(0, htmlNode.Children[2].Children.Count); + } + + + [TestMethod] + public void Test_Parse_TextWithBrTag() + { + String htmlText = "asdf
asdf"; + String expectedResult = "asdf
asdf"; + + HtmlNode htmlNode = Parser.Parse(htmlText); + + Assert.IsNotNull(htmlNode, "The HtmlNode returned by the parser is null."); + + Assert.AreEqual(htmlNode.Children.Count, 3); + + Assert.IsInstanceOfType(htmlNode.Children[0], typeof(HtmlTextNode)); + + HtmlTextNode htmlTextNode = htmlNode.Children[0] as HtmlTextNode; + + Assert.IsInstanceOfType(htmlNode.Children[1], typeof(HtmlBrNode)); + + HtmlBrNode htmlBrNode = htmlNode.Children[1] as HtmlBrNode; + + Assert.IsInstanceOfType(htmlNode.Children[2], typeof(HtmlTextNode)); + + htmlTextNode = htmlNode.Children[2] as HtmlTextNode; + + Assert.AreEqual(expectedResult, htmlNode.InnerHtml); + } + + [TestMethod] + public void Test_Parse_SpanWithStyle() + { + String htmlText = "asdf"; + String expectedResult = "asdf"; + + HtmlNode htmlNode = Parser.Parse(htmlText); + + Assert.IsNotNull(htmlNode, "The HtmlNode returned by the parser is null."); + + Assert.AreEqual(htmlNode.Children.Count, 1); + + Assert.IsInstanceOfType(htmlNode.Children[0], typeof(HtmlSpanNode)); + + HtmlSpanNode spanNode = htmlNode.Children[0] as HtmlSpanNode; + + IEnumerable> spanStyleAttributes = spanNode.Attributes.Where(i=>i.Key == "style"); + /* + Assert.AreEqual(spanStyleAttributes.Count(), 1); + + KeyValuePair spanStyleAttribute = spanStyleAttributes.First(); + + Assert.AreEqual(spanStyleAttribute.Value, "color:black"); + /**/ + + IEnumerable> spanColorStyles = spanNode.Styles.Where(i => i.Key == "color"); + + Assert.AreEqual(spanColorStyles.Count(), 1); + + KeyValuePair spanColorStyle = spanColorStyles.First(); + + //Assert.AreEqual(spanColorStyle.Value, "rgb(0,0,0)"); + Assert.AreEqual(spanColorStyle.Value, "black"); + /**/ + + Assert.AreEqual(expectedResult, htmlNode.InnerHtml); + } + + [TestMethod] + public void Test_Parse_Div() + { + String htmlText = "
asdf
"; + String expectedResult = "
asdf
"; + + HtmlNode htmlNode = Parser.Parse(htmlText); + + Assert.IsNotNull(htmlNode, "The HtmlNode returned by the parser is null."); + + Assert.AreEqual(htmlNode.Children.Count, 1); + + Assert.IsInstanceOfType(htmlNode.Children[0], typeof(HtmlDivNode)); + + HtmlDivNode divNode = htmlNode.Children[0] as HtmlDivNode; + + Assert.AreEqual(divNode.Children.Count, 1); + + Assert.AreEqual(expectedResult, htmlNode.InnerHtml); + } + + [TestMethod] + public void Test_Parse_Img() + { + String htmlText = ""; + String expectedResult = ""; + + HtmlNode htmlNode = Parser.Parse(htmlText); + + Assert.IsNotNull(htmlNode, "The HtmlNode returned by the parser is null."); + + Assert.AreEqual(htmlNode.Children.Count, 1); + + Assert.IsInstanceOfType(htmlNode.Children[0], typeof(HtmlImgNode)); + + HtmlImgNode imgNode = htmlNode.Children[0] as HtmlImgNode; + + Assert.AreEqual(imgNode.Children.Count, 0); + + Assert.AreEqual(expectedResult, htmlNode.InnerHtml); + + Assert.AreEqual(imgNode.Attributes.Count, 1); + Assert.AreEqual(imgNode.Styles.Count, 0); + var temp = imgNode.Attributes.Where(i=>i.Key == "src"); + Assert.AreEqual(temp.Count(), 1); + Assert.AreEqual(temp.Single().Value, "http://blogs.msdn.com/blogfiles/klevereblog/WindowsLiveWriter/Bingishere_A002/bing-logo_2.jpg"); + } + } +} + diff --git a/Plan B Html Parser (XNA 3.1)/TestProject1/Properties/AssemblyInfo.cs b/Plan B Html Parser (XNA 3.1)/TestProject1/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..6e937f6 --- /dev/null +++ b/Plan B Html Parser (XNA 3.1)/TestProject1/Properties/AssemblyInfo.cs @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("TestProject1")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("TestProject1")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2009")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM componenets. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("e044337f-2da1-429d-8f24-45bc7651026c")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Plan B Html Parser (XNA 3.1)/TestProject1/TestProject1.csproj b/Plan B Html Parser (XNA 3.1)/TestProject1/TestProject1.csproj new file mode 100644 index 0000000..7c04cab --- /dev/null +++ b/Plan B Html Parser (XNA 3.1)/TestProject1/TestProject1.csproj @@ -0,0 +1,68 @@ + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {9E7D5692-C2E9-4219-977E-143CC75B5737} + Library + Properties + TestProject1 + TestProject1 + v3.5 + 512 + {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + SAK + SAK + SAK + SAK + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + 3.5 + + + + + + + + + + + + + + + {A6FA0455-ACB5-4E80-9E58-6B79976AA717} + Plan B Html Parser + + + + + \ No newline at end of file diff --git a/Plan B Html Parser (XNA 3.1)/TestProject1/TestProject1.csproj.vspscc b/Plan B Html Parser (XNA 3.1)/TestProject1/TestProject1.csproj.vspscc new file mode 100644 index 0000000..feffdec --- /dev/null +++ b/Plan B Html Parser (XNA 3.1)/TestProject1/TestProject1.csproj.vspscc @@ -0,0 +1,10 @@ +"" +{ +"FILE_VERSION" = "9237" +"ENLISTMENT_CHOICE" = "NEVER" +"PROJECT_FILE_RELATIVE_PATH" = "" +"NUMBER_OF_EXCLUDED_FILES" = "0" +"ORIGINAL_PROJECT_FILE_PATH" = "" +"NUMBER_OF_NESTED_PROJECTS" = "0" +"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER" +}