示例#1
0
        public string SendFiles(byte[][] files, string[] filename)
        {
            AuthenticationProxy proxy2 = new AuthenticationProxy();
            MSG msgi = new MSG()
            {
                Op_name   = "LoadFiles",
                FileName  = filename,
                data      = files,
                TokenUser = "",
            };

            msgi = proxy2.Dispatching(msgi);
            return(msgi.Op_statut.ToString());
        }
示例#2
0
        static void Main(string[] args)
        {
            AuthenticationProxy proxy = new AuthenticationProxy();

            string[]           files = new string[] { "" };
            Server_WCF_IIS.MSG msg   = new Server_WCF_IIS.MSG();
            msg.Op_name   = "LoginByToken";
            msg.TokenApp  = "456e7472657a20766f7472652070687261736520696369";
            msg.TokenUser = "";
            // TODO add msg.Files

            msg = proxy.Dispatching(msg);

            Console.WriteLine("Value op statut : {0}, info: {1}", msg.Op_statut.ToString(), msg.Op_infos);
            Console.Read();
        }
示例#3
0
 public string Login(string email, string password, string AppToken)
 {
     if (email.Length == 0 || password.Length == 0 || !Regex.IsMatch(email, @"^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$"))
     {
         return("False");
     }
     else
     {
         //Logique metier
         AuthenticationProxy proxy = new AuthenticationProxy();
         string[]            files = new string[] { "" };
         Server_WCF_IIS.MSG  msg   = new Server_WCF_IIS.MSG()
         {
             Op_name   = "LoginByToken",
             TokenApp  = AppToken,
             TokenUser = "",
             Password  = password,
             Email     = email
         };
         // TODO add msg.Files
         msg = proxy.Dispatching(msg);
         return(msg.Op_statut.ToString());
     }
 }