Testing 2

This commit is contained in:
Rick Falkvinge
2012-11-05 18:40:26 +00:00
parent 410069f742
commit b386114ed7
2 changed files with 22 additions and 3 deletions
+5
View File
@@ -1,4 +1,5 @@
using System;
using System.Xml.Serialization;
using Activizr.Logic.Cache;
using Activizr.Logic.Interfaces;
using Activizr.Basic.Enums;
@@ -113,11 +114,15 @@ namespace Activizr.Logic.Structure
get { return Children.Identities; }
}
[XmlIgnore] // interface cannot be serialized
[SoapIgnore]
public ITreeNodeObject ParentObject
{
get { return this.Parent; }
}
[XmlIgnore] // interface cannot be serialized
[SoapIgnore]
public List<ITreeNodeObject> ChildObjects
{
get
+17 -3
View File
@@ -4,8 +4,6 @@ using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using Activizr.Basic.Types;
using Activizr.Database;
using Activizr.Logic.Structure;
[WebService(Namespace = "http://activizr.com/")]
@@ -38,6 +36,21 @@ public class GetGeographyData : System.Web.Services.WebService {
}
[WebMethod]
public Geographies GetGeographiesFromRoot (int rootId)
{
return Geography.FromIdentity(rootId).GetTree();
}
[WebMethod]
public Geographies GetGeographiesForCountry (string countryCode)
{
Country country = Country.FromCode(countryCode);
return GetGeographiesFromRoot(country.GeographyId);
}
/*
[WebMethod]
public BasicGeography[] GetGeographiesFromRoot (int rootId)
{
return PirateDb.GetDatabase().GetGeographyTree(rootId);
@@ -49,5 +62,6 @@ public class GetGeographyData : System.Web.Services.WebService {
Country country = Country.FromCode(countryCode);
return PirateDb.GetDatabase().GetGeographyTree(country.GeographyId);
}
*/
}