Пример #1
0
 private EpisodeEntitlement CreateEpisodeEntitlement(EntitlementRequest request, EpisodeSubscriptionProduct subscription, ProductEpisode episode, DateTime registDt)
 {
     EpisodeEntitlement entitlement = new EpisodeEntitlement()
     {
         EndDate = GetEntitlementEndDate(subscription.Duration, subscription.DurationType, registDt),
         Episode = (Episode)episode.Episode,
         OfferingId = offeringId,
         LatestEntitlementRequest = request
     };
     return entitlement;
 }
Пример #2
0
 private static EpisodeEntitlement CreateEpisodeEntitlement(EntitlementRequest request, EpisodeSubscriptionProduct subscription, ProductEpisode episode, DateTime registDt)
 {
     var currentDt = registDt;
     if (subscription.BreakingDate != null)
         registDt = (DateTime)subscription.BreakingDate > currentDt ? (DateTime)subscription.BreakingDate : currentDt;
     EpisodeEntitlement entitlement = new EpisodeEntitlement()
     {
         EndDate = MyUtility.getEntitlementEndDate(subscription.Duration, subscription.DurationType, registDt),
         Episode = (Episode)episode.Episode,
         OfferingId = GlobalConfig.offeringId,
         LatestEntitlementRequest = request
     };
     return entitlement;
 }