Batch.Internal.UnlockModule.RedeemCode C# (CSharp) Метод

RedeemCode() публичный Метод

Redeems offer using a code.
public RedeemCode ( string code ) : void
code string Code.
Результат void
        public void RedeemCode(string code)
        {
            if ( RedeemCodeSuccess == null )
            {
                Logger.Error(false, "RedeemCode", "Cannot redeem a code without anything listening to RedeemCodeSuccess.");
                return;
            }

            if ( RedeemCodeFailed == null )
            {
                Logger.Error(false, "RedeemCode", "Cannot redeem a code without anything listening to RedeemCodeFailed.");
                return;
            }

            try
            {
                JsonData data = new JsonData();
                data["code"] = code;
                bridge.Call("redeemCode", JsonMapper.ToJson(data));
            }
            catch(Exception e)
            {
                Logger.Error(true, "RedeemCode", e);
            }
        }