/** ** campaignTemplates() method definition **/ public MCTemplate[] campaignTemplates() { try { DummyMCTemplate[] tmp = this.api.campaignTemplates(this.apikey); MCTemplate[] toret = new MCTemplate[tmp.Length]; int i = 0; foreach (DummyMCTemplate t in tmp) { toret[i].id = t.id; toret[i].name = t.name; toret[i].layout = t.layout; int j = 0; if (t.sections is System.String[]) { toret[i].sections = new string[((System.String[])t.sections).Length]; foreach (System.String name in (System.String[])t.sections) { toret[i].sections[j] = name; j++; } } else if (t.sections is XmlRpcStruct) { XmlRpcStruct s = (XmlRpcStruct)t.sections; toret[i].sections = new string[(s).Count]; foreach (string name in s.Keys) { toret[i].sections[j] = (string)s[name]; j++; } } i++; } return(toret); } catch (XmlRpcTypeMismatchException) { return(new MCTemplate[0]); } }
/** ** campaignTemplates() method definition **/ public MCTemplate[] campaignTemplates() { try { DummyMCTemplate[] tmp = this.api.campaignTemplates(this.apikey); MCTemplate[] toret = new MCTemplate[tmp.Length]; int i = 0; foreach (DummyMCTemplate t in tmp) { toret[i].id = t.id; toret[i].name = t.name; toret[i].layout = t.layout; int j = 0; if (t.sections is System.String[]) { toret[i].sections = new string[((System.String[])t.sections).Length]; foreach (System.String name in (System.String[])t.sections) { toret[i].sections[j] = name; j++; } } else if (t.sections is XmlRpcStruct) { XmlRpcStruct s = (XmlRpcStruct)t.sections; toret[i].sections = new string[(s).Count]; foreach (string name in s.Keys) { toret[i].sections[j] = (string)s[name]; j++; } } i++; } return toret; } catch (XmlRpcTypeMismatchException) { return new MCTemplate[0]; } }