Trying another workaround for serialization

This commit is contained in:
Rick Falkvinge
2012-11-05 18:21:51 +00:00
parent b9fc17df7f
commit 410069f742
2 changed files with 6 additions and 6 deletions
-2
View File
@@ -113,13 +113,11 @@ namespace Activizr.Logic.Structure
get { return Children.Identities; }
}
[NonSerialized] // interface cannot be serialized
public ITreeNodeObject ParentObject
{
get { return this.Parent; }
}
[NonSerialized] // interface cannot be serialized
public List<ITreeNodeObject> ChildObjects
{
get
+6 -4
View File
@@ -4,6 +4,8 @@ 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/")]
@@ -36,16 +38,16 @@ public class GetGeographyData : System.Web.Services.WebService {
}
[WebMethod]
public Geographies GetGeographiesFromRoot (int rootId)
public BasicGeography[] GetGeographiesFromRoot (int rootId)
{
return Geography.FromIdentity(rootId).GetTree();
return PirateDb.GetDatabase().GetGeographyTree(rootId);
}
[WebMethod]
public Geographies GetGeographiesForCountry (string countryCode)
public BasicGeography[] GetGeographiesForCountry (string countryCode)
{
Country country = Country.FromCode(countryCode);
return GetGeographiesFromRoot(country.GeographyId);
return PirateDb.GetDatabase().GetGeographyTree(country.GeographyId);
}
}