Exemplo n.º 1
0
        public OperationResult Synchronize(string tokenInternalID, string firstPwd, string secondPwd)
        {
            OperationResult result;

            try
            {
                string          assemb  = new TokensValidatorDAO().ValidatorAssemblyNameByTokenID(tokenInternalID);
                ITokenValidator _tokens = TokenValidatorFactory.LoadAssembly(assemb);
                if (_tokens == null)
                {
                    SAFLOGGER.Write(SAFLOGGER.LOGGEREventID.ERROR, "SAFCORE", new string[]
                    {
                        "http://sfexpand.SAFCore.PREProcessorTokens.softfinanca.com/",
                        "[ITokenValidator]::" + assemb.Trim(),
                        "Invalid or null typename!"
                    });
                    result = OperationResult.Error;
                }
                else
                {
                    result = _tokens.Synchronize(tokenInternalID, firstPwd, secondPwd);
                }
            }
            catch (Exception ex)
            {
                SAFLOGGER.Write(SAFLOGGER.LOGGEREventID.EXCEPTION, "SAFCORE", new string[]
                {
                    "http://sfexpand.SAFCore.PREProcessorTokens.softfinanca.com/",
                    Assembly.GetExecutingAssembly().FullName.ToString(),
                    ex.ToString()
                });
                result = OperationResult.Error;
            }
            return(result);
        }
Exemplo n.º 2
0
        public OperationResult Synchronize(string tokenInternalID, string firstPwd, string secondPwd)
        {
            OperationResult result;

            try
            {
                string          typeName       = new TokensValidatorDAO().ValidatorAssemblyNameByTokenID(tokenInternalID);
                ITokenValidator tokenValidator = TokenValidatorFactory.LoadAssembly(typeName);
                result = tokenValidator.Synchronize(tokenInternalID, firstPwd, secondPwd);
            }
            catch (Exception innerException)
            {
                throw new Exception("SF.Expand.SAF.Core::Synchronize[]", innerException);
            }
            return(result);
        }