Ejemplo n.º 1
0
        public bool HasRequiredTransactionPurchase(Transaction transaction, RequiredPurchase requiredPurchase)
        {
            lock (this)
            {
                if (_accountFeatures.TryGetValue(requiredPurchase.RequiredPurchaseGroupId, out var accoutFeature))
                {
                    return(accoutFeature.HasRequiredTransactionPurchase(transaction, requiredPurchase));
                }

                if (_accountSubscriptions.TryGetValue(requiredPurchase.RequiredPurchaseGroupId, out var subscriptionFeature))
                {
                    return(subscriptionFeature.HasRequiredTransactionPurchase(transaction, requiredPurchase));
                }

                return(false);
            }
        }
Ejemplo n.º 2
0
 public virtual void Consume(RequiredPurchase requiredPurchase)
 {
     CheckPurchaseType(requiredPurchase.RequiredPurchaseType, requiredPurchase.RequiredPurchaseGroupId);
 }
Ejemplo n.º 3
0
 public virtual bool HasRequiredTransactionPurchase(Transaction transaction, RequiredPurchase requiredPurchase)
 {
     CheckPurchaseType(requiredPurchase.RequiredPurchaseType, requiredPurchase.RequiredPurchaseGroupId);
     return(false);
 }
Ejemplo n.º 4
0
 public override bool HasRequiredTransactionPurchase(Transaction transaction, RequiredPurchase requiredPurchase)
 {
     base.HasRequiredTransactionPurchase(transaction, requiredPurchase);
     return(SubscriptionEnd > transaction.Timestamp);
 }
Ejemplo n.º 5
0
 public override bool HasRequiredTransactionPurchase(Transaction transaction, RequiredPurchase requiredPurchase)
 {
     base.HasRequiredTransactionPurchase(transaction, requiredPurchase);
     return(true);
 }