Moves XNA 4 files for Github migration.
This commit is contained in:
11
Plan B Html Parser/Tokens/HtmlBeginDivToken.cs
Normal file
11
Plan B Html Parser/Tokens/HtmlBeginDivToken.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace PlanB.Html.Tokens
|
||||
{
|
||||
internal class HtmlBeginDivToken:HtmlToken
|
||||
{
|
||||
}
|
||||
}
|
||||
15
Plan B Html Parser/Tokens/HtmlBeginSpanToken.cs
Normal file
15
Plan B Html Parser/Tokens/HtmlBeginSpanToken.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace PlanB.Html.Tokens
|
||||
{
|
||||
internal class HtmlBeginSpanToken: HtmlToken
|
||||
{
|
||||
public override string ToString()
|
||||
{
|
||||
return "<span>";
|
||||
}
|
||||
}
|
||||
}
|
||||
15
Plan B Html Parser/Tokens/HtmlBrToken.cs
Normal file
15
Plan B Html Parser/Tokens/HtmlBrToken.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace PlanB.Html.Tokens
|
||||
{
|
||||
internal class HtmlBrToken: HtmlToken
|
||||
{
|
||||
public override string ToString()
|
||||
{
|
||||
return "<br/>";
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Plan B Html Parser/Tokens/HtmlEndDivToken.cs
Normal file
11
Plan B Html Parser/Tokens/HtmlEndDivToken.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace PlanB.Html.Tokens
|
||||
{
|
||||
internal class HtmlEndDivToken: HtmlToken
|
||||
{
|
||||
}
|
||||
}
|
||||
15
Plan B Html Parser/Tokens/HtmlEndSpanToken.cs
Normal file
15
Plan B Html Parser/Tokens/HtmlEndSpanToken.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace PlanB.Html.Tokens
|
||||
{
|
||||
internal class HtmlEndSpanToken: HtmlToken
|
||||
{
|
||||
public override string ToString()
|
||||
{
|
||||
return "</span>";
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Plan B Html Parser/Tokens/HtmlImgToken.cs
Normal file
11
Plan B Html Parser/Tokens/HtmlImgToken.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace PlanB.Html.Tokens
|
||||
{
|
||||
internal class HtmlImgToken: HtmlToken
|
||||
{
|
||||
}
|
||||
}
|
||||
27
Plan B Html Parser/Tokens/HtmlTextToken.cs
Normal file
27
Plan B Html Parser/Tokens/HtmlTextToken.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace PlanB.Html.Tokens
|
||||
{
|
||||
internal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
39
Plan B Html Parser/Tokens/HtmlToken.cs
Normal file
39
Plan B Html Parser/Tokens/HtmlToken.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace PlanB.Html.Tokens
|
||||
{
|
||||
internal class HtmlToken
|
||||
{
|
||||
public List<KeyValuePair<string, string>> Attributes { get; set; }
|
||||
|
||||
public HtmlToken()
|
||||
{
|
||||
Attributes = new List<KeyValuePair<string, string>>();
|
||||
}
|
||||
|
||||
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<string, string> attribute = new KeyValuePair<string, string>(m.Groups["attributeName"].Captures[i].ToString(), m.Groups["attributeValue"].Captures[i].ToString());
|
||||
KeyValuePair<string, string> attribute = new KeyValuePair<string, string>(attributeNameGroup.Captures[i].ToString(), attributeValueGroup.Captures[i].ToString());
|
||||
Attributes.Add(attribute);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user