Beispiel #1
0
        public void registerProviderLoginDataManager(ProviderLoginDataManager pldm)
        {
            StringBuilder sb = new StringBuilder("local __logindatas = {};\n");

            foreach (int pvid in pldm.getProviderIds())
            {
                string data = Encoding.ASCII.GetString(Base64Encode.transform(pldm.getData(pvid).getBytes()));
                sb.Append("__logindatas[" + pvid + "] = { data = '" + data + "',");
                sb.Append(pldm.isSafe(pvid) ? "label = " + pldm.getLabel(pvid) + "}\n" : "base64 = 1}\n");
            }
            sb.Append("return __logindatas");
            instance(lua.name("registerLoginDatas").eval(sb.ToString()));
        }
Beispiel #2
0
        public void registerProviderLoginDataManager(ProviderLoginDataManager pldm)
        {
            StringBuilder sb = new StringBuilder("var __logindatas = {};\n");

            foreach (int pvid in pldm.getProviderIds())
            {
                string data = Encoding.ASCII.GetString(Base64Encode.transform(pldm.getData(pvid).getBytes()));
                sb.Append("__logindatas[" + pvid + "] = { data : '" + data + "', ");
                sb.Append(pldm.isSafe(pvid) ? "label : " + pldm.getLabel(pvid) + "};\n" : "base64 : 1 };\n");
            }
            sb.Append("limax(__logindatas);\n");
            jsc.sync(js => js.name("registerLoginDatas").eval(sb.ToString()));
        }