邮件黑猩猩listSubscribe包装函数c#

时间:2014-12-31 13:05:40

标签: c# mailchimp

我在Mail chimp v1.1 class

中有一个方法
 [XmlRpcMethod("listSubscribe")]

 //bool listSubscribe(string apikey, string id, string email_address, Hashtable mv, string email_type, bool double_optin);

我替换为

bool listSubscribe(string apikey, string id, string email_address, array merge_vars, string email_type, bool double_optin, bool update_existing, bool replace_interests, bool send_welcome);     

现在它给了我错误类型或命名空间名称'数组'找不到(你错过了使用指令或汇编引用吗?

我应该在" 数组 merge_vars"的C#包装器文件中写什么?参数。

1 个答案:

答案 0 :(得分:1)

     /**
     ** listSubscribe method definitions
     **/
    public bool listSubscribe(string id, string email_address){
        return this.listSubscribe(id, email_address, new MCMergeVar[0]);
    }
    public bool listSubscribe(string id, string email_address, MCMergeVar[] merges){
        return this.listSubscribe(id, email_address, merges, "html");
    }
    public bool listSubscribe(string id, string email_address, MCMergeVar[] merges, string email_type){
        return this.listSubscribe(id, email_address, merges, email_type, true);
    }
    public bool listSubscribe(string id, string email_address, MCMergeVar[] merges, string email_type, bool double_optin){
        //XmlRpcStruct mv = this.mergeArrayToStruct(merges);
        return this.listSubscribe(id, email_address, merges, email_type, double_optin, false);
    }
    public bool listSubscribe(string id, string email_address, MCMergeVar[] merges, string email_type, bool double_optin, bool update_existing)
    {
        XmlRpcStruct mv = this.mergeArrayToStruct(merges);
        return this.api.listSubscribe(this.apikey, id, email_address, mv, email_type, double_optin, update_existing, true, false);
    }

   [XmlRpcMethod("listSubscribe")]
    //bool listSubscribe(string apikey, string id, string email_address, Hashtable mv, string email_type, bool double_optin);
    bool listSubscribe(string apikey, string id, string email_address, Hashtable merge_vars, string email_type, bool double_optin, bool update_existing, bool replace_interests, bool send_welcome);