using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
namespace NLS
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
class RegularExpressionReader
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
public static List<string> FindMatches(string findPattern, string replacePattern, string input)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
List<string> list = new List<string>();
Regex regex = new Regex(findPattern);
MatchCollection mc = regex.Matches(input);
foreach (Match m in mc)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
string ri = m.Value;
string text = Regex.Replace(ri, findPattern, replacePattern);
list.Add(text);
}
return list;
}
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
public static List<string> FindMatches(string findPattern, string input)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
List<string> list = new List<string>();
Regex regex = new Regex(findPattern);
MatchCollection mc = regex.Matches(input);
foreach (Match m in mc)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
string ri = m.Value;
list.Add(ri);
}
return list;
}
}
}
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using Entities;
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
namespace NLS
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
{
class Worker
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
"ReadXML"#region "ReadXML"
public static string ReadXML(string FilePath)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
using (StreamReader sr = new StreamReader(FilePath))
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
return sr.ReadToEnd();
}
}
#endregion
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
"Parse"#region "Parse"
public static void Parse()
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
Parse(@"C:\feed\listings-1.xml");
Parse(@"C:\feed\listings-2.xml");
Parse(@"C:\feed\listings-3.xml");
Parse(@"C:\feed\listings-4.xml");
Parse(@"C:\feed\listings-5.xml");
Parse(@"C:\feed\listings-6.xml");
Parse(@"C:\feed\listings-7.xml");
Parse(@"C:\feed\listings-8.xml");
Parse(@"C:\feed\listings-9.xml");
Parse(@"C:\feed\listings-10.xml");
}
public static void Parse(string FilePath)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
string XMLContent = Worker.ReadXML(FilePath);
List<string> listings = RegularExpressionReader.FindMatches("<Listing>[\\s\\S]+?</Listing>", XMLContent);
List<Listing> list = new List<Listing>();
foreach (string s in listings)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
Listing l = new Listing();
GetListingID(s, ref l);
GetRegionalMLSNumber(s, ref l);
GetListDate(s, ref l);
GetSoldDate(s, ref l);
GetLastUpdateDate(s, ref l);
GetStatus(s, ref l);
GetTitle(s, ref l);
GetSubtitle(s, ref l);
GetDetailViewUrl(s, ref l);
GetEmail(s, ref l);
GetWebBugUrl(s, ref l);
GetListingTelephone(s, ref l);
GetVirtualTourUrl(s, ref l);
GetLocation(s, ref l);
GetDetails(s, ref l);
GetMedia(s, ref l);
GetListingAgent(s, ref l);
GetBroker(s, ref l);
list.Add(l);
}
foreach (Listing l in list)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
DataBaseWorker.SaveListing(l);
}
}
#endregion
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
"GetBroker"#region "GetBroker"
private static void GetBroker(string ListingContent, ref Listing listing)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
try
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
string realData = RegularExpressionReader.FindMatches("<Broker>[\\s\\S]+?</Broker>", ListingContent)[0];
Broker b = new Broker();
b.Name = RegularExpressionReader.FindMatches("<Name>(?<joey>[^<]+)</Name>", "${joey}", realData)[0];
listing.Broker = b;
}
catch
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
}
}
#endregion
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
"GetListingAgent"#region "GetListingAgent"
private static void GetListingAgent(string ListingContent, ref Listing listing)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
try
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
string realData = RegularExpressionReader.FindMatches("<ListingAgent>[\\s\\S]+?</ListingAgent>", ListingContent)[0];
ListingAgent la = new ListingAgent();
GetAgentID(realData, ref la);
GetAgentName(realData, ref la);
GetAgentContactInfo(realData, ref la);
GetAgentMedia(realData, ref la);
listing.ListingAgent = la;
}
catch
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
}
}
#endregion
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
"GetAgentMedia"#region "GetAgentMedia"
private static void GetAgentMedia(string AgentContent, ref ListingAgent ListingAgent)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
try
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
string realData = RegularExpressionReader.FindMatches("<Media>[\\s\\S]+?</Media>", AgentContent)[0];
List<string> list = RegularExpressionReader.FindMatches("<Item[^>]+>[\\s\\S]+?</Item>", realData);
List<MediaItem> Media = new List<MediaItem>();
foreach (string s in list)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
MediaItem mi = new MediaItem();
string[] array = RegularExpressionReader.FindMatches("<Item( id=\"(?<id>[^\"]+)\")? mimeType=\"(?<mimetype>[^\"]+)\" medium=\"(?<medium>[^\"]+)\"( caption=\"(?<caption>[^\"]+)\")?>", "${id},${mimetype},${medium},${caption}", s)[0].Split(',');
if (!string.IsNullOrEmpty(array[0]))
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
mi.ContentID = Convert.ToInt32(array[0]);
}
mi.MimeType = array[1];
mi.Medium = array[2];
if (!string.IsNullOrEmpty(array[3]))
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
mi.Caption = array[3];
}
GetUrls(s, ref mi);
Media.Add(mi);
}
ListingAgent.Media = Media;
}
catch
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
}
}
#endregion
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
"GetAgentContactInfo"#region "GetAgentContactInfo"
private static void GetAgentContactInfo(string AgentContent, ref ListingAgent ListingAgent)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
try
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
string realData = RegularExpressionReader.FindMatches("<ContactInfo>[\\s\\S]+?</ContactInfo>", AgentContent)[0];
ContactInfo ci = new ContactInfo();
GetTelephones(realData, ref ci);
GetProfileUrl(realData, ref ci);
GetWebSite(realData, ref ci);
ListingAgent.ContactInfo = ci;
}
catch
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
}
}
#endregion
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
"GetTelephones"#region "GetTelephones"
private static void GetTelephones(string ContactContent, ref ContactInfo ContactInfo)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
try
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
List<string> list = RegularExpressionReader.FindMatches("<Telephone name=\"(?<name>[^\"]+)\">(?<value>[^<]+)</Telephone>", "$
{name},$
{value}", ContactContent);
List<Telephone> Telephones = new List<Telephone>();
foreach (string s in list)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
string[] array = s.Split(',');
Telephone t = new Telephone();
t.Name = array[0];
t.Value = array[1];
Telephones.Add(t);
}
ContactInfo.Telephones = Telephones;
}
catch
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
}
}
#endregion
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
"GetProfileUrl"#region "GetProfileUrl"
private static void GetProfileUrl(string ContactContent, ref ContactInfo ContactInfo)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
try
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
ContactInfo.ProfileUrl = RegularExpressionReader.FindMatches("<ProfileUrl>(?<joey>[^<]+)</ProfileUrl>", "${joey}", ContactContent)[0];
}
catch
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
}
}
#endregion
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
"GetWebSite"#region "GetWebSite"
private static void GetWebSite(string ContactContent, ref ContactInfo ContactInfo)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
try
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
ContactInfo.WebSite = RegularExpressionReader.FindMatches("<WebSite>(?<joey>[^<]+)</WebSite>", "${joey}", ContactContent)[0];
}
catch
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
}
}
#endregion
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
"GetAgentName"#region "GetAgentName"
private static void GetAgentName(string AgentContent, ref ListingAgent ListingAgent)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
try
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
ListingAgent.Name = RegularExpressionReader.FindMatches("<Name>(?<joey>[^<]+)</Name>", "${joey}", AgentContent)[0];
}
catch
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
}
}
#endregion
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
"GetAgentID"#region "GetAgentID"
private static void GetAgentID(string AgentContent, ref ListingAgent ListingAgent)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
try
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
ListingAgent.ID = Convert.ToInt32(RegularExpressionReader.FindMatches("<AgentID>(?<joey>[^<]+)</AgentID>", "${joey}", AgentContent)[0]);
}
catch
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
}
}
#endregion
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
"GetMedia"#region "GetMedia"
private static void GetMedia(string ListingContent, ref Listing listing)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
try
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
string realData = RegularExpressionReader.FindMatches("</Details>([\\r\\n]\\s*)??<Media>[\\s\\S]+?</Media>([\\r\\n]\\s*)??<ListingAgent>", ListingContent)[0];
List<string> list = RegularExpressionReader.FindMatches("<Item[^>]+>[\\s\\S]+?</Item>", realData);
List<MediaItem> Media = new List<MediaItem>();
foreach (string s in list)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
MediaItem mi = new MediaItem();
string[] array = RegularExpressionReader.FindMatches("<Item( id=\"(?<id>[^\"]+)\")? mimeType=\"(?<mimetype>[^\"]+)\" medium=\"(?<medium>[^\"]+)\"( caption=\"(?<caption>[^\"]+)\")?>", "${id},${mimetype},${medium},${caption}", s)[0].Split(',');
if (!string.IsNullOrEmpty(array[0]))
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
mi.ContentID = Convert.ToInt32(array[0]);
}
mi.MimeType = array[1];
mi.Medium = array[2];
if (!string.IsNullOrEmpty(array[3]))
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
mi.Caption = array[3];
}
GetUrls(s, ref mi);
Media.Add(mi);
}
listing.Media = Media;
}
catch
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
}
}
#endregion
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
"GetUrls"#region "GetUrls"
private static void GetUrls(string ItemContent, ref MediaItem MediaItem)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
try
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
List<string> list = RegularExpressionReader.FindMatches("<Url style=\"(?<style>[^\"]+)\">(?<value>[^<]+)</Url>", "$
{style},$
{value}", ItemContent);
List<Url> Urls = new List<Url>();
foreach (string s in list)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
string[] array = s.Split(',');
Url u = new Url();
u.Style = array[0];
u.Value = array[1];
Urls.Add(u);
}
MediaItem.Urls = Urls;
}
catch
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
}
}
#endregion
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
"GetDetails"#region "GetDetails"
private static void GetDetails(string ListingContent, ref Listing listing)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
Details d = new Details();
GetDescription(ListingContent, ref d);
GetListPrice(ListingContent, ref d);
GetRentalPrice(ListingContent, ref d);
GetAvailableDate(ListingContent, ref d);
GetTaxAmount(ListingContent, ref d);
GetAssociationFee(ListingContent, ref d);
GetPropertyType(ListingContent, ref d);
GetHasSuite(ListingContent, ref d);
GetDetailStyle(ListingContent, ref d);
GetLivingArea(ListingContent, ref d);
GetLot(ListingContent, ref d);
GetDevelopmentLevel(ListingContent, ref d);
GetYearBuilt(ListingContent, ref d);
GetBedrooms(ListingContent, ref d);
GetBathrooms(ListingContent, ref d);
GetDetailBasementType(ListingContent, ref d);
GetGarage(ListingContent, ref d);
GetFeatures(ListingContent, ref d);
GetHighlights(ListingContent, ref d);
listing.Details = d;
}
#endregion
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
"GetHighlights"#region "GetHighlights"
private static void GetHighlights(string ListingContent, ref Details details)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
try
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
List<string> list = RegularExpressionReader.FindMatches("<Highlight>(?<joey>[^<]+)</Highlight>", "${joey}", ListingContent);
List<Highlight> Highlights = new List<Highlight>();
foreach (string s in list)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
Highlight h = new Highlight();
h.Value = s;
Highlights.Add(h);
}
details.Highlights = Highlights;
}
catch
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
}
}
#endregion
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
"GetFeatures"#region "GetFeatures"
private static void GetFeatures(string ListingContent, ref Details details)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
try
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
List<string> list = RegularExpressionReader.FindMatches("<Feature category=\"(?<category>[^\"]+)\">(?<value>[^<]+)</Feature>", "$
{category},$
{value}", ListingContent);
List<Feature> Features = new List<Feature>();
foreach (string s in list)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
string[] array = s.Split(',');
Feature f = new Feature();
switch (array[0])
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
case "Roof":
f.FeatureCategory = FeatureCategoryEnum.Roof;
break;
case "Exterior":
f.FeatureCategory = FeatureCategoryEnum.Exterior;
break;
case "Interior":
f.FeatureCategory = FeatureCategoryEnum.Interior;
break;
case "Outdoor":
f.FeatureCategory = FeatureCategoryEnum.Outdoor;
break;
case "Security":
f.FeatureCategory = FeatureCategoryEnum.Security;
break;
case "View":
f.FeatureCategory = FeatureCategoryEnum.View;
break;
default:
break;
}
switch (array[1])
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
"cases"#region "cases"
case "Alarm System":
f.ValidFeature = ValidFeatureEnum.AlarmSystem;
break;
case "Fenced Yard":
f.ValidFeature = ValidFeatureEnum.FencedYard;
break;
case "Security Guard on Duty":
f.ValidFeature = ValidFeatureEnum.SecurityGuardOnDuty;
break;
case "TV Security":
f.ValidFeature = ValidFeatureEnum.TVSecurity;
break;
case "Private Elevator":
f.ValidFeature = ValidFeatureEnum.PrivateElevator;
break;
case "Controlled Access":
f.ValidFeature = ValidFeatureEnum.ControlledAccess;
break;
case "Asphalt":
f.ValidFeature = ValidFeatureEnum.Asphalt;
break;
case "Composition":
f.ValidFeature = ValidFeatureEnum.Composition;
break;
case "Concrete Tile":
f.ValidFeature = ValidFeatureEnum.ConcreteTile;
break;
case "Spanish / Clay Tile":
f.ValidFeature = ValidFeatureEnum.SpanishOrClayTile;
break;
case "Shakes / Wood Shingles":
f.ValidFeature = ValidFeatureEnum.ShakesOrWoodShingles;
break;
case "Slate Rock":
f.ValidFeature = ValidFeatureEnum.SlateRock;
break;
case "Metal":
f.ValidFeature = ValidFeatureEnum.Metal;
break;
case "Built Up":
f.ValidFeature = ValidFeatureEnum.BuiltUp;
break;
case "Asphalt Shingles":
f.ValidFeature = ValidFeatureEnum.AsphaltShingles;
break;
case "Heating":
f.ValidFeature = ValidFeatureEnum.Heating;
break;
case "Cooling":
f.ValidFeature = ValidFeatureEnum.Cooling;
break;
case "Fireplace":
f.ValidFeature = ValidFeatureEnum.Fireplace;
break;
case "Humidifier":
f.ValidFeature = ValidFeatureEnum.Humidifier;
break;
case "Skylight":
f.ValidFeature = ValidFeatureEnum.Skylight;
break;
case "Air Filter":
f.ValidFeature = ValidFeatureEnum.AirFilter;
break;
case "Cathedral Ceiling":
f.ValidFeature = ValidFeatureEnum.CathedralCeiling;
break;
case "Wet Bar":
f.ValidFeature = ValidFeatureEnum.WetBar;
break;
case "Window Coverings":
f.ValidFeature = ValidFeatureEnum.WindowCoverings;
break;
case "Wine Storage":
f.ValidFeature = ValidFeatureEnum.WineStorage;
break;
case "Sauna":
f.ValidFeature = ValidFeatureEnum.Sauna;
break;
case "Vaulted Ceiling":
f.ValidFeature = ValidFeatureEnum.VaultedCeiling;
break;
case "Ceiling Fan":
f.ValidFeature = ValidFeatureEnum.CeilingFan;
break;
case "Air Purifier":
f.ValidFeature = ValidFeatureEnum.AirPurifier;
break;
case "Intercom":
f.ValidFeature = ValidFeatureEnum.Intercom;
break;
case "Deck":
f.ValidFeature = ValidFeatureEnum.Deck;
break;
case "Boat Facilities":
f.ValidFeature = ValidFeatureEnum.BoatFacilities;
break;
case "RV Parking":
f.ValidFeature = ValidFeatureEnum.RVParking;
break;
case "Lawn":
f.ValidFeature = ValidFeatureEnum.Lawn;
break;
case "Landscaped":
f.ValidFeature = ValidFeatureEnum.Landscaped;
break;
case "Fenced":
f.ValidFeature = ValidFeatureEnum.Fenced;
break;
case "Front Porch":
f.ValidFeature = ValidFeatureEnum.FrontPorch;
break;
case "Balcony":
f.ValidFeature = ValidFeatureEnum.Balcony;
break;
case "Gas Line Hook-up for BBQ":
f.ValidFeature = ValidFeatureEnum.GasLineHookUpForBBQ;
break;
case "Garage Door Opener":
f.ValidFeature = ValidFeatureEnum.GarageDoorOpener;
break;
case "Dock Available":
f.ValidFeature = ValidFeatureEnum.DockAvailable;
break;
case "Garden Area":
f.ValidFeature = ValidFeatureEnum.GardenArea;
break;
case "Trees / Shrubs":
f.ValidFeature = ValidFeatureEnum.TreesOrShrubs;
break;
case "Patio":
f.ValidFeature = ValidFeatureEnum.Patio;
break;
case "Shed":
f.ValidFeature = ValidFeatureEnum.Shed;
break;
case "Courtyard":
f.ValidFeature = ValidFeatureEnum.Courtyard;
break;
case "Clubhouse":
f.ValidFeature = ValidFeatureEnum.Clubhouse;
break;
case "Playground":
f.ValidFeature = ValidFeatureEnum.Playground;
break;
case "Underground Sprinklers":
f.ValidFeature = ValidFeatureEnum.UndergroundSprinklers;
break;
case "Corner Lot":
f.ValidFeature = ValidFeatureEnum.CornerLot;
break;
case "Cul-de-sac":
f.ValidFeature = ValidFeatureEnum.Culdesac;
break;
case "Pool":
f.ValidFeature = ValidFeatureEnum.Pool;
break;
case "Siding":
f.ValidFeature = ValidFeatureEnum.Siding;
break;
case "Aluminum":
f.ValidFeature = ValidFeatureEnum.Aluminum;
break;
case "Log":
f.ValidFeature = ValidFeatureEnum.Log;
break;
case "Aluminum-Steel":
f.ValidFeature = ValidFeatureEnum.AluminumSteel;
break;
case "Asbestos":
f.ValidFeature = ValidFeatureEnum.Asbestos;
break;
case "Brick":
f.ValidFeature = ValidFeatureEnum.Brick;
break;
case "Cedar":
f.ValidFeature = ValidFeatureEnum.Cedar;
break;
case "Concrete Block":
f.ValidFeature = ValidFeatureEnum.ConcreteBlock;
break;
case "Frame":
f.ValidFeature = ValidFeatureEnum.Frame;
break;
case "Glass":
f.ValidFeature = ValidFeatureEnum.Glass;
break;
case "Marble/Granite":
f.ValidFeature = ValidFeatureEnum.MarbleORGranite;
break;
case "Masonite":
f.ValidFeature = ValidFeatureEnum.Masonite;
break;
case "Shakes":
f.ValidFeature = ValidFeatureEnum.Shakes;
break;
case "Shingle":
f.ValidFeature = ValidFeatureEnum.Shingle;
break;
case "Stone":
f.ValidFeature = ValidFeatureEnum.Stone;
break;
case "Stucco":
f.ValidFeature = ValidFeatureEnum.Stucco;
break;
case "Vinyl":
f.ValidFeature = ValidFeatureEnum.Vinyl;
break;
case "Wood":
f.ValidFeature = ValidFeatureEnum.Wood;
break;
case "Wood-Stucco":
f.ValidFeature = ValidFeatureEnum.WoodStucco;
break;
case "City Lights":
f.ValidFeature = ValidFeatureEnum.CityLights;
break;
case "Mountain View":
f.ValidFeature = ValidFeatureEnum.MountainView;
break;
case "Ocean View":
f.ValidFeature = ValidFeatureEnum.OceanView;
break;
case "River View":
f.ValidFeature = ValidFeatureEnum.RiverView;
break;
case "Lake View":
f.ValidFeature = ValidFeatureEnum.LakeView;
break;
case "Golf Course":
f.ValidFeature = ValidFeatureEnum.GolfCourse;
break;
case "Water View":
f.ValidFeature = ValidFeatureEnum.WaterView;
break;
#endregion
default:
break;
}
Features.Add(f);
}
details.Features = Features;
}
catch
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
}
}
#endregion
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
"GetGarage"#region "GetGarage"
private static void GetGarage(string ListingContent, ref Details details)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
try
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
List<string> list = RegularExpressionReader.FindMatches("<Garage style=\"(?<style>[^\"]+)\"( stalls=\"(?<stalls>[^\"]+)\")?( comment=\"(?<comment>[^\"]+)\")? />", "$
{style},$
{stalls},$
{comment}", ListingContent);
List<Garage> Garages = new List<Garage>();
foreach (string s in list)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
string[] array = s.Split(',');
Garage g = new Garage();
switch (array[0])
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
case "Detached":
g.GarageStyle = GarageStyleEnum.Detached;
break;
case "Attached":
g.GarageStyle = GarageStyleEnum.Attached;
break;
case "Barn":
g.GarageStyle = GarageStyleEnum.Barn;
break;
case "Garage":
g.GarageStyle = GarageStyleEnum.Garage;
break;
case "Guest House":
g.GarageStyle = GarageStyleEnum.GuestHouse;
break;
case "[Not Specified]":
g.GarageStyle = GarageStyleEnum.NotSpecified;
break;
case "Other":
g.GarageStyle = GarageStyleEnum.Other;
break;
case "Pool House/Cabana":
g.GarageStyle = GarageStyleEnum.PoolHouseOrCabana;
break;
case "Quonset":
g.GarageStyle = GarageStyleEnum.Quonset;
break;
case "Shed":
g.GarageStyle = GarageStyleEnum.Shed;
break;
case "Workshop":
g.GarageStyle = GarageStyleEnum.Workshop;
break;
case "Yard":
g.GarageStyle = GarageStyleEnum.Yard;
break;
default:
break;
}
if (!string.IsNullOrEmpty(array[1]))
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
g.Stalls = Convert.ToInt32(array[1]);
}
if (!string.IsNullOrEmpty(array[2]))
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
g.Comment = array[2];
}
Garages.Add(g);
}
details.Garages = Garages;
}
catch
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
}
}
#endregion
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
"GetDetailBasementType"#region "GetDetailBasementType"
private static void GetDetailBasementType(string ListingContent, ref Details details)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
try
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
string[] array = RegularExpressionReader.FindMatches("<BasementType( comment=\"(?<comment>[^\"]+)\")?>(?<value>[^<]+)</BasementType>", "$
{comment},$
{value}", ListingContent)[0].Split(',');
DetailBasementType dbt = new DetailBasementType();
if (!string.IsNullOrEmpty(array[0]))
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
dbt.Comment = array[0];
}
switch (array[1])
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
case "Crawl":
dbt.BasementType = BasementTypeEnum.Crawl;
break;
case "Full":
dbt.BasementType = BasementTypeEnum.Full;
break;
case "Partial":
dbt.BasementType = BasementTypeEnum.Partial;
break;
case "Slab":
dbt.BasementType = BasementTypeEnum.Slab;
break;
case "Walkout":
dbt.BasementType = BasementTypeEnum.Walkout;
break;
default:
break;
}
details.DetailBasementType = dbt;
}
catch
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
}
}
#endregion
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
"GetBathrooms"#region "GetBathrooms"
private static void GetBathrooms(string ListingContent, ref Details details)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
try
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
string[] array = RegularExpressionReader.FindMatches("<Bathrooms( comment=\"(?<comment>[^\"]+)\")?>(?<value>[^<]+)</Bathrooms>", "$
{comment},$
{value}", ListingContent)[0].Split(',');
Bathrooms b = new Bathrooms();
if (!string.IsNullOrEmpty(array[0]))
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
b.Comment = array[0];
}
b.Value = Convert.ToInt32(array[1]);
details.Bathrooms = b;
}
catch
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
}
}
#endregion
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
"GetBedrooms"#region "GetBedrooms"
private static void GetBedrooms(string ListingContent, ref Details details)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
try
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
string[] array = RegularExpressionReader.FindMatches("<Bedrooms( comment=\"(?<comment>[^\"]+)\")?>(?<value>[^<]+)</Bedrooms>", "$
{comment},$
{value}", ListingContent)[0].Split(',');
Bedrooms b = new Bedrooms();
if (!string.IsNullOrEmpty(array[0]))
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
b.Comment = array[0];
}
b.Value = Convert.ToInt32(array[1]);
details.Bedrooms = b;
}
catch
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
}
}
#endregion
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
"GetYearBuilt"#region "GetYearBuilt"
private static void GetYearBuilt(string ListingContent, ref Details details)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
try
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
string[] array = RegularExpressionReader.FindMatches("<YearBuilt( comment=\"(?<comment>[^\"]+)\")?>(?<value>[^<]+)</YearBuilt>", "$
{comment},$
{value}", ListingContent)[0].Split(',');
YearBuilt yb = new YearBuilt();
if (!string.IsNullOrEmpty(array[0]))
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
yb.Comment = array[0];
}
yb.Value = Convert.ToInt32(array[1]);
details.YearBuilt = yb;
}
catch
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
}
}
#endregion
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
"GetDevelopmentLevel"#region "GetDevelopmentLevel"
private static void GetDevelopmentLevel(string ListingContent, ref Details details)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
try
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
string level = RegularExpressionReader.FindMatches("<DevelopmentLevel>(?<joey>[^<]+)</DevelopmentLevel>", "${joey}", ListingContent)[0];
switch (level)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
case "Under Construction":
details.DevelopmentLevel = DevelopmentLevelEnum.UnderConstruction;
break;
case "Renovation":
details.DevelopmentLevel = DevelopmentLevelEnum.Renovation;
break;
case "Plan Only":
details.DevelopmentLevel = DevelopmentLevelEnum.PlanOnly;
break;
case "Land Only":
details.DevelopmentLevel = DevelopmentLevelEnum.LandOnly;
break;
case "Built":
details.DevelopmentLevel = DevelopmentLevelEnum.Built;
break;
default:
break;
}
}
catch
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
}
}
#endregion
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
"GetLot"#region "GetLot"
private static void GetLot(string ListingContent, ref Details details)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
try
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
Lot lot = new Lot();
GetLotLegal(ListingContent, ref lot);
GetDimensions(ListingContent, ref lot);
GetLotComment(ListingContent, ref lot);
details.Lot = lot;
}
catch
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
}
}
#endregion
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
"GetLotComment"#region "GetLotComment"
private static void GetLotComment(string ListingContent, ref Lot lot)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
try
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
lot.Comment = RegularExpressionReader.FindMatches("<Lot( comment=\"(?<joey>[^\"]+)\")?>", "$
{joey}", ListingContent)[0];
}
catch
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
}
}
#endregion
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
"GetDimensions"#region "GetDimensions"
private static void GetDimensions(string ListingContent, ref Lot lot)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
try
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
Dimensions d = new Dimensions();
GetLength(ListingContent, ref d);
GetWidth(ListingContent, ref d);
GetHeight(ListingContent, ref d);
lot.Dimensions = d;
}
catch
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
}
}
#endregion
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
"GetHeight"#region "GetHeight"
private static void GetHeight(string ListingContent, ref Dimensions dimensions)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
try
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
string[] array = RegularExpressionReader.FindMatches("<Height unit=\"(?<unit>[^\"]+)\">(?<value>[^<]+)</Height>", "$
{unit},$
{value}", ListingContent)[0].Split(',');
Height h = new Height();
switch (array[0])
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
case "acres":
h.Unit = UnitEnum.Acres;
break;
case "feet":
h.Unit = UnitEnum.Feet;
break;
case "hectares":
h.Unit = UnitEnum.Hectares;
break;
case "metres":
h.Unit = UnitEnum.Metres;
break;
case "square feet":
h.Unit = UnitEnum.SquareFeet;
break;
case "square metres":
h.Unit = UnitEnum.SquareMetres;
break;
default:
break;
}
h.Value = Convert.ToDouble(array[1]);
dimensions.Height = h;
}
catch
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
}
}
#endregion
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
"GetWidth"#region "GetWidth"
private static void GetWidth(string ListingContent, ref Dimensions dimensions)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
try
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
string[] array = RegularExpressionReader.FindMatches("<Width unit=\"(?<unit>[^\"]+)\">(?<value>[^<]+)</Width>", "$
{unit},$
{value}", ListingContent)[0].Split(',');
Width w = new Width();
switch (array[0])
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
case "acres":
w.Unit = UnitEnum.Acres;
break;
case "feet":
w.Unit = UnitEnum.Feet;
break;
case "hectares":
w.Unit = UnitEnum.Hectares;
break;
case "metres":
w.Unit = UnitEnum.Metres;
break;
case "square feet":
w.Unit = UnitEnum.SquareFeet;
break;
case "square metres":
w.Unit = UnitEnum.SquareMetres;
break;
default:
break;
}
w.Value = Convert.ToDouble(array[1]);
dimensions.Width = w;
}
catch
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
}
}
#endregion
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
"GetLength"#region "GetLength"
private static void GetLength(string ListingContent, ref Dimensions dimensions)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
try
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
string[] array = RegularExpressionReader.FindMatches("<Length unit=\"(?<unit>[^\"]+)\">(?<value>[^<]+)</Length>", "$
{unit},$
{value}", ListingContent)[0].Split(',');
Length l = new Length();
switch (array[0])
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
case "acres":
l.Unit = UnitEnum.Acres;
break;
case "feet":
l.Unit = UnitEnum.Feet;
break;
case "hectares":
l.Unit = UnitEnum.Hectares;
break;
case "metres":
l.Unit = UnitEnum.Metres;
break;
case "square feet":
l.Unit = UnitEnum.SquareFeet;
break;
case "square metres":
l.Unit = UnitEnum.SquareMetres;
break;
default:
break;
}
l.Value = Convert.ToDouble(array[1]);
dimensions.Length = l;
}
catch
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
}
}
#endregion
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
"GetLotLegal"#region "GetLotLegal"
private static void GetLotLegal(string ListingContent, ref Lot lot)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
try
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
lot.LotLegal = RegularExpressionReader.FindMatches("<LotLegal>(?<joey>[^<]+)</LotLegal>", "${joey}", ListingContent)[0];
}
catch
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
}
}
#endregion
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
"GetLivingArea"#region "GetLivingArea"
private static void GetLivingArea(string ListingContent, ref Details details)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
try
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
string[] array = RegularExpressionReader.FindMatches("<LivingArea unit=\"(?<unit>[^\"]+)\"( comment=\"(?<comment>[^\"]+)\")?>(?<value>[^<]+)</LivingArea>", "${unit},${comment},${value}", ListingContent)[0].Split(',');
LivingArea la = new LivingArea();
switch (array[0])
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
case "acres":
la.Unit = UnitEnum.Acres;
break;
case "feet":
la.Unit = UnitEnum.Feet;
break;
case "hectares":
la.Unit = UnitEnum.Hectares;
break;
case "metres":
la.Unit = UnitEnum.Metres;
break;
case "square feet":
la.Unit = UnitEnum.SquareFeet;
break;
case "square metres":
la.Unit = UnitEnum.SquareMetres;
break;
default:
break;
}
if (!string.IsNullOrEmpty(array[1]))
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
la.Comment = array[1];
}
la.Value = Convert.ToDouble(array[2]);
details.LivingArea = la;
}
catch
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
}
}
#endregion
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
"GetDetailStyle"#region "GetDetailStyle"
private static void GetDetailStyle(string ListingContent, ref Details details)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
try
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
string[] array = RegularExpressionReader.FindMatches("<Style( comment=\"(?<comment>[^\"]+)\")?>(?<joey>[^<]+)?</Style>", "$
{comment},$
{joey}", ListingContent)[0].Split(',');
DetailStyle ds = new DetailStyle();
if (!string.IsNullOrEmpty(array[0]))
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
ds.Comment = array[0];
}
switch (array[1])
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
case "Apartment":
ds.Style = StyleEnum.Apartment;
break;
case "Bungalow":
ds.Style = StyleEnum.Bungalow;
break;
case "Colonial":
ds.Style = StyleEnum.Colonial;
break;
case "Commercial":
ds.Style = StyleEnum.Commercial;
break;
case "Duplex":
ds.Style = StyleEnum.Duplex;
break;
case "5-Level Split":
ds.Style = StyleEnum.FiveLevelSplit;
break;
case "4-Level Split":
ds.Style = StyleEnum.FourLevelSplit;
break;
case "Fourplex":
ds.Style = StyleEnum.Fourplex;
break;
case "Lot / Land":
ds.Style = StyleEnum.LotOrLand;
break;
case "Manufactured Home":
ds.Style = StyleEnum.ManufacturedHome;
break;
case "Multiplex":
ds.Style = StyleEnum.Multiplex;
break;
case "1 1/2 Story":
ds.Style = StyleEnum.OnePointFiveStory;
break;
case "1 3/4 Story":
ds.Style = StyleEnum.OnePointSevenFiveStory;
break;
case "Ranch":
ds.Style = StyleEnum.Ranch;
break;
case "Single Story":
ds.Style = StyleEnum.SingleStory;
break;
case "Bi-Level":
ds.Style = StyleEnum.BiLevel;
break;
case "3 Story":
ds.Style = StyleEnum.ThreeStory;
break;
case "3-Level Split":
ds.Style = StyleEnum.ThreeLevelSplit;
break;
case "Townhouse":
ds.Style = StyleEnum.Townhouse;
break;
case "Triplex":
ds.Style = StyleEnum.Triplex;
break;
case "2 1/2 Story":
ds.Style = StyleEnum.TwoPointFiveStory;
break;
case "2 Story":
ds.Style = StyleEnum.TwoStory;
break;
case "2 Story Split":
ds.Style = StyleEnum.TwoStorySplit;
break;
default:
break;
}
details.DetailStyle = ds;
}
catch
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
}
}
#endregion
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
"GetHasSuite"#region "GetHasSuite"
private static void GetHasSuite(string ListingContent, ref Details details)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
try
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
details.HasSuite = Convert.ToBoolean(RegularExpressionReader.FindMatches("<HasSuite>(?<joey>[^<]+)?</HasSuite>", "${joey}", ListingContent)[0]);
}
catch
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
}
}
#endregion
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
"GetPropertyType"#region "GetPropertyType"
private static void GetPropertyType(string ListingContent, ref Details details)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
try
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
string type = RegularExpressionReader.FindMatches("<PropertyType>(?<joey>[^<]+)?</PropertyType>", "${joey}", ListingContent)[0];
switch (type)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
case "Farm / Acreage":
details.PropertyType = PropertyTypeEnum.FarmOrAcreage;
break;
case "Commercial":
details.PropertyType = PropertyTypeEnum.Commercial;
break;
case "Condominium":
details.PropertyType = PropertyTypeEnum.Condominium;
break;
case "Co-op":
details.PropertyType = PropertyTypeEnum.Coop;
break;
case "Residential":
details.PropertyType = PropertyTypeEnum.Residential;
break;
case "Recreational":
details.PropertyType = PropertyTypeEnum.Recreational;
break;
default:
break;
}
}
catch
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
}
}
#endregion
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
"GetAssociationFee"#region "GetAssociationFee"
private static void GetAssociationFee(string ListingContent, ref Details details)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
try
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
string[] array = RegularExpressionReader.FindMatches("<AssociationFee currency=\"(?<currency>[^\"]+)\"( period=\"(?<period>[^\"]+)\")?>(?<value>[^<]+)</AssociationFee>", "${currency},${period},${value}", ListingContent)[0].Split(',');
AssociationFee af = new AssociationFee();
switch (array[0])
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
"cases"#region "cases"
case "AED":
af.Currency = CurrencyEnum.AED;
break;
case "ANG":
af.Currency = CurrencyEnum.ANG;
break;
case "ARS":
af.Currency = CurrencyEnum.ARS;
break;
case "AUD":
af.Currency = CurrencyEnum.AUD;
break;
case "BAM":
af.Currency = CurrencyEnum.BAM;
break;
case "BGL":
af.Currency = CurrencyEnum.BGL;
break;
case "BMD":
af.Currency = CurrencyEnum.BMD;
break;
case "BRL":
af.Currency = CurrencyEnum.BRL;
break;
case "BSD":
af.Currency = CurrencyEnum.BSD;
break;
case "BWP":
af.Currency = CurrencyEnum.BWP;
break;
case "BZD":
af.Currency = CurrencyEnum.BZD;
break;
case "CAD":
af.Currency = CurrencyEnum.CAD;
break;
case "CLP":
af.Currency = CurrencyEnum.CLP;
break;
case "CNY":
af.Currency = CurrencyEnum.CNY;
break;
case "COP":
af.Currency = CurrencyEnum.COP;
break;
case "CRC":
af.Currency = CurrencyEnum.CRC;
break;
case "CSD":
af.Currency = CurrencyEnum.CSD;
break;
case "CYP":
af.Currency = CurrencyEnum.CYP;
break;
case "CZK":
af.Currency = CurrencyEnum.CZK;
break;
case "DEM":
af.Currency = CurrencyEnum.DEM;
break;
case "DOP":
af.Currency = CurrencyEnum.DOP;
break;
case "EEK":
af.Currency = CurrencyEnum.EEK;
break;
case "EGP":
af.Currency = CurrencyEnum.EGP;
break;
case "EUR":
af.Currency = CurrencyEnum.EUR;
break;
case "GBP":
af.Currency = CurrencyEnum.GBP;
break;
case "GRD":
af.Currency = CurrencyEnum.GRD;
break;
case "HKD":
af.Currency = CurrencyEnum.HKD;
break;
case "HRK":
af.Currency = CurrencyEnum.HRK;
break;
case "HUF":
af.Currency = CurrencyEnum.HUF;
break;
case "ILS":
af.Currency = CurrencyEnum.ILS;
break;
case "INR":
af.Currency = CurrencyEnum.INR;
break;
case "KES":
af.Currency = CurrencyEnum.KES;
break;
case "KYD":
af.Currency = CurrencyEnum.KYD;
break;
case "LBP":
af.Currency = CurrencyEnum.LBP;
break;
case "LKR":
af.Currency = CurrencyEnum.LKR;
break;
case "MAD":
af.Currency = CurrencyEnum.MAD;
break;
case "MTL":
af.Currency = CurrencyEnum.MTL;
break;
case "MUR":
af.Currency = CurrencyEnum.MUR;
break;
case "MXN":
af.Currency = CurrencyEnum.MXN;
break;
case "MYR":
af.Currency = CurrencyEnum.MYR;
break;
case "NAD":
af.Currency = CurrencyEnum.NAD;
break;
case "NGN":
af.Currency = CurrencyEnum.NGN;
break;
case "NZD":
af.Currency = CurrencyEnum.NZD;
break;
case "PAB":
af.Currency = CurrencyEnum.PAB;
break;
case "PHP":
af.Currency = CurrencyEnum.PHP;
break;
case "PKR":
af.Currency = CurrencyEnum.PKR;
break;
case "PTE":
af.Currency = CurrencyEnum.PTE;
break;
case "RON":
af.Currency = CurrencyEnum.RON;
break;
case "RWF":
af.Currency = CurrencyEnum.RWF;
break;
case "SCR":
af.Currency = CurrencyEnum.SCR;
break;
case "SGD":
af.Currency = CurrencyEnum.SGD;
break;
case "THB":
af.Currency = CurrencyEnum.THB;
break;
case "TRL":
af.Currency = CurrencyEnum.TRL;
break;
case "TTD":
af.Currency = CurrencyEnum.TTD;
break;
case "USD":
af.Currency = CurrencyEnum.USD;
break;
case "UYU":
af.Currency = CurrencyEnum.UYU;
break;
case "VEB":
af.Currency = CurrencyEnum.VEB;
break;
case "VUV":
af.Currency = CurrencyEnum.VUV;
break;
case "XCD":
af.Currency = CurrencyEnum.XCD;
break;
case "XFP":
af.Currency = CurrencyEnum.XFP;
break;
case "XPF":
af.Currency = CurrencyEnum.XPF;
break;
case "ZAR":
af.Currency = CurrencyEnum.ZAR;
break;
case "ZMK":
af.Currency = CurrencyEnum.ZMK;
break;
#endregion
default:
break;
}
switch (array[1])
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
case "Daily":
af.Period = PeriodEnum.Daily;
break;
case "Weekly":
af.Period = PeriodEnum.Weekly;
break;
case "Monthly":
af.Period = PeriodEnum.Monthly;
break;
case "Six Months":
af.Period = PeriodEnum.SixMonths;
break;
case "One Year":
af.Period = PeriodEnum.OneYear;
break;
case "Two Year":
af.Period = PeriodEnum.TwoYear;
break;
case "Three Year":
af.Period = PeriodEnum.ThreeYear;
break;
case "Five Year":
af.Period = PeriodEnum.FiveYear;
break;
default:
break;
}
af.Value = Convert.ToDouble(array[2]);
details.AssociationFee = af;
}
catch
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
}
}
#endregion
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
"GetTaxAmount"#region "GetTaxAmount"
private static void GetTaxAmount(string ListingContent, ref Details details)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
try
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
string[] array = RegularExpressionReader.FindMatches("<TaxAmount currency=\"(?<currency>[^\"]+)\"( taxYear=\"(?<year>[^\"]+)\")?>(?<value>[^<]+)</TaxAmount>", "${currency},${year},${value}", ListingContent)[0].Split(',');
TaxAmount ta = new TaxAmount();
switch (array[0])
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
"cases"#region "cases"
case "AED":
ta.Currency = CurrencyEnum.AED;
break;
case "ANG":
ta.Currency = CurrencyEnum.ANG;
break;
case "ARS":
ta.Currency = CurrencyEnum.ARS;
break;
case "AUD":
ta.Currency = CurrencyEnum.AUD;
break;
case "BAM":
ta.Currency = CurrencyEnum.BAM;
break;
case "BGL":
ta.Currency = CurrencyEnum.BGL;
break;
case "BMD":
ta.Currency = CurrencyEnum.BMD;
break;
case "BRL":
ta.Currency = CurrencyEnum.BRL;
break;
case "BSD":
ta.Currency = CurrencyEnum.BSD;
break;
case "BWP":
ta.Currency = CurrencyEnum.BWP;
break;
case "BZD":
ta.Currency = CurrencyEnum.BZD;
break;
case "CAD":
ta.Currency = CurrencyEnum.CAD;
break;
case "CLP":
ta.Currency = CurrencyEnum.CLP;
break;
case "CNY":
ta.Currency = CurrencyEnum.CNY;
break;
case "COP":
ta.Currency = CurrencyEnum.COP;
break;
case "CRC":
ta.Currency = CurrencyEnum.CRC;
break;
case "CSD":
ta.Currency = CurrencyEnum.CSD;
break;
case "CYP":
ta.Currency = CurrencyEnum.CYP;
break;
case "CZK":
ta.Currency = CurrencyEnum.CZK;
break;
case "DEM":
ta.Currency = CurrencyEnum.DEM;
break;
case "DOP":
ta.Currency = CurrencyEnum.DOP;
break;
case "EEK":
ta.Currency = CurrencyEnum.EEK;
break;
case "EGP":
ta.Currency = CurrencyEnum.EGP;
break;
case "EUR":
ta.Currency = CurrencyEnum.EUR;
break;
case "GBP":
ta.Currency = CurrencyEnum.GBP;
break;
case "GRD":
ta.Currency = CurrencyEnum.GRD;
break;
case "HKD":
ta.Currency = CurrencyEnum.HKD;
break;
case "HRK":
ta.Currency = CurrencyEnum.HRK;
break;
case "HUF":
ta.Currency = CurrencyEnum.HUF;
break;
case "ILS":
ta.Currency = CurrencyEnum.ILS;
break;
case "INR":
ta.Currency = CurrencyEnum.INR;
break;
case "KES":
ta.Currency = CurrencyEnum.KES;
break;
case "KYD":
ta.Currency = CurrencyEnum.KYD;
break;
case "LBP":
ta.Currency = CurrencyEnum.LBP;
break;
case "LKR":
ta.Currency = CurrencyEnum.LKR;
break;
case "MAD":
ta.Currency = CurrencyEnum.MAD;
break;
case "MTL":
ta.Currency = CurrencyEnum.MTL;
break;
case "MUR":
ta.Currency = CurrencyEnum.MUR;
break;
case "MXN":
ta.Currency = CurrencyEnum.MXN;
break;
case "MYR":
ta.Currency = CurrencyEnum.MYR;
break;
case "NAD":
ta.Currency = CurrencyEnum.NAD;
break;
case "NGN":
ta.Currency = CurrencyEnum.NGN;
break;
case "NZD":
ta.Currency = CurrencyEnum.NZD;
break;
case "PAB":
ta.Currency = CurrencyEnum.PAB;
break;
case "PHP":
ta.Currency = CurrencyEnum.PHP;
break;
case "PKR":
ta.Currency = CurrencyEnum.PKR;
break;
case "PTE":
ta.Currency = CurrencyEnum.PTE;
break;
case "RON":
ta.Currency = CurrencyEnum.RON;
break;
case "RWF":
ta.Currency = CurrencyEnum.RWF;
break;
case "SCR":
ta.Currency = CurrencyEnum.SCR;
break;
case "SGD":
ta.Currency = CurrencyEnum.SGD;
break;
case "THB":
ta.Currency = CurrencyEnum.THB;
break;
case "TRL":
ta.Currency = CurrencyEnum.TRL;
break;
case "TTD":
ta.Currency = CurrencyEnum.TTD;
break;
case "USD":
ta.Currency = CurrencyEnum.USD;
break;
case "UYU":
ta.Currency = CurrencyEnum.UYU;
break;
case "VEB":
ta.Currency = CurrencyEnum.VEB;
break;
case "VUV":
ta.Currency = CurrencyEnum.VUV;
break;
case "XCD":
ta.Currency = CurrencyEnum.XCD;
break;
case "XFP":
ta.Currency = CurrencyEnum.XFP;
break;
case "XPF":
ta.Currency = CurrencyEnum.XPF;
break;
case "ZAR":
ta.Currency = CurrencyEnum.ZAR;
break;
case "ZMK":
ta.Currency = CurrencyEnum.ZMK;
break;
#endregion
default:
break;
}
if (!string.IsNullOrEmpty(array[1]))
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
ta.TaxYear = Convert.ToInt32(array[1]);
}
ta.Value = Convert.ToDouble(array[2]);
details.TaxAmount = ta;
}
catch
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
}
}
#endregion
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
"GetAvailableDate"#region "GetAvailableDate"
private static void GetAvailableDate(string ListingContent, ref Details details)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
try
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
details.AvailableDate = Convert.ToDateTime(RegularExpressionReader.FindMatches("<AvailableDate>(?<joey>[^<]+)</AvailableDate>", "${joey}", ListingContent)[0]);
}
catch
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
}
}
#endregion
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
"GetRentalPrice"#region "GetRentalPrice"
private static void GetRentalPrice(string ListingContent, ref Details details)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
try
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
string[] array = RegularExpressionReader.FindMatches("<RentalPrice( comment=\"(?<comment>[^\"]+)\")? period=\"(?<period>[^\"]+)\" currency=\"(?<currency>[^\"]+)\">(?<value>[^<]+)</RentalPrice>", "$
{comment},$
{period},$
{currency},$
{value}", ListingContent)[0].Split(',');
RentalPrice rp = new RentalPrice();
if (!string.IsNullOrEmpty(array[0]))
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
rp.Comment = array[0];
}
switch (array[1])
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
case "Daily":
rp.Period = PeriodEnum.Daily;
break;
case "Weekly":
rp.Period = PeriodEnum.Weekly;
break;
case "Monthly":
rp.Period = PeriodEnum.Monthly;
break;
case "Six Months":
rp.Period = PeriodEnum.SixMonths;
break;
case "One Year":
rp.Period = PeriodEnum.OneYear;
break;
case "Two Year":
rp.Period = PeriodEnum.TwoYear;
break;
case "Three Year":
rp.Period = PeriodEnum.ThreeYear;
break;
case "Five Year":
rp.Period = PeriodEnum.FiveYear;
break;
default:
break;
}
switch (array[2])
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
"cases"#region "cases"
case "AED":
rp.Currency = CurrencyEnum.AED;
break;
case "ANG":
rp.Currency = CurrencyEnum.ANG;
break;
case "ARS":
rp.Currency = CurrencyEnum.ARS;
break;
case "AUD":
rp.Currency = CurrencyEnum.AUD;
break;
case "BAM":
rp.Currency = CurrencyEnum.BAM;
break;
case "BGL":
rp.Currency = CurrencyEnum.BGL;
break;
case "BMD":
rp.Currency = CurrencyEnum.BMD;
break;
case "BRL":
rp.Currency = CurrencyEnum.BRL;
break;
case "BSD":
rp.Currency = CurrencyEnum.BSD;
break;
case "BWP":
rp.Currency = CurrencyEnum.BWP;
break;
case "BZD":
rp.Currency = CurrencyEnum.BZD;
break;
case "CAD":
rp.Currency = CurrencyEnum.CAD;
break;
case "CLP":
rp.Currency = CurrencyEnum.CLP;
break;
case "CNY":
rp.Currency = CurrencyEnum.CNY;
break;
case "COP":
rp.Currency = CurrencyEnum.COP;
break;
case "CRC":
rp.Currency = CurrencyEnum.CRC;
break;
case "CSD":
rp.Currency = CurrencyEnum.CSD;
break;
case "CYP":
rp.Currency = CurrencyEnum.CYP;
break;
case "CZK":
rp.Currency = CurrencyEnum.CZK;
break;
case "DEM":
rp.Currency = CurrencyEnum.DEM;
break;
case "DOP":
rp.Currency = CurrencyEnum.DOP;
break;
case "EEK":
rp.Currency = CurrencyEnum.EEK;
break;
case "EGP":
rp.Currency = CurrencyEnum.EGP;
break;
case "EUR":
rp.Currency = CurrencyEnum.EUR;
break;
case "GBP":
rp.Currency = CurrencyEnum.GBP;
break;
case "GRD":
rp.Currency = CurrencyEnum.GRD;
break;
case "HKD":
rp.Currency = CurrencyEnum.HKD;
break;
case "HRK":
rp.Currency = CurrencyEnum.HRK;
break;
case "HUF":
rp.Currency = CurrencyEnum.HUF;
break;
case "ILS":
rp.Currency = CurrencyEnum.ILS;
break;
case "INR":
rp.Currency = CurrencyEnum.INR;
break;
case "KES":
rp.Currency = CurrencyEnum.KES;
break;
case "KYD":
rp.Currency = CurrencyEnum.KYD;
break;
case "LBP":
rp.Currency = CurrencyEnum.LBP;
break;
case "LKR":
rp.Currency = CurrencyEnum.LKR;
break;
case "MAD":
rp.Currency = CurrencyEnum.MAD;
break;
case "MTL":
rp.Currency = CurrencyEnum.MTL;
break;
case "MUR":
rp.Currency = CurrencyEnum.MUR;
break;
case "MXN":
rp.Currency = CurrencyEnum.MXN;
break;
case "MYR":
rp.Currency = CurrencyEnum.MYR;
break;
case "NAD":
rp.Currency = CurrencyEnum.NAD;
break;
case "NGN":
rp.Currency = CurrencyEnum.NGN;
break;
case "NZD":
rp.Currency = CurrencyEnum.NZD;
break;
case "PAB":
rp.Currency = CurrencyEnum.PAB;
break;
case "PHP":
rp.Currency = CurrencyEnum.PHP;
break;
case "PKR":
rp.Currency = CurrencyEnum.PKR;
break;
case "PTE":
rp.Currency = CurrencyEnum.PTE;
break;
case "RON":
rp.Currency = CurrencyEnum.RON;
break;
case "RWF":
rp.Currency = CurrencyEnum.RWF;
break;
case "SCR":
rp.Currency = CurrencyEnum.SCR;
break;
case "SGD":
rp.Currency = CurrencyEnum.SGD;
break;
case "THB":
rp.Currency = CurrencyEnum.THB;
break;
case "TRL":
rp.Currency = CurrencyEnum.TRL;
break;
case "TTD":
rp.Currency = CurrencyEnum.TTD;
posted @
2008-05-26 22:51
N/A2011
阅读(
171)
评论()
编辑
收藏
举报