Пример #1
0
        public OperationResult UndoCreate(string tokenInternalID)
        {
            OperationResult result;

            try
            {
                string  assemb  = new TokensValidatorDAO().DeployAssemblyNameByTokenID(tokenInternalID);
                ITokens _tokens = TokensFactory.LoadAssembly(assemb);
                if (_tokens == null)
                {
                    SAFLOGGER.Write(SAFLOGGER.LOGGEREventID.ERROR, "SAFCORE", new string[]
                    {
                        "http://sfexpand.SAFCore.PREProcessorTokens.softfinanca.com/",
                        "[ITokens]::" + assemb.Trim(),
                        "Invalid or null typename!"
                    });
                    result = OperationResult.Error;
                }
                else
                {
                    result = _tokens.UndoCreate(tokenInternalID);
                }
            }
            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);
        }
Пример #2
0
        public OperationResult UndoCreate(string tokenInternalID)
        {
            OperationResult result;

            try
            {
                string  typeName = new TokensValidatorDAO().DeployAssemblyNameByTokenID(tokenInternalID);
                ITokens tokens   = TokensFactory.LoadAssembly(typeName);
                result = tokens.UndoCreate(tokenInternalID);
            }
            catch (Exception innerException)
            {
                throw new Exception("SF.Expand.SAF.Core.PREProcessorTokens::UndoCreate[]", innerException);
            }
            return(result);
        }