@@ -14,6 +14,13 @@ public class AcmeOrdersFeedRpdeGenerator : OrdersRPDEFeedModifiedTimestampAndID
1414 {
1515 //public override string FeedPath { get; protected set; } = "example path override";
1616
17+ private readonly AppSettings _appSettings ;
18+
19+ public AcmeOrdersFeedRpdeGenerator ( AppSettings appSettings )
20+ {
21+ _appSettings = appSettings ;
22+ }
23+
1724 protected override async Task < List < RpdeItem > > GetRPDEItems ( string clientId , long ? afterTimestamp , string afterId )
1825 {
1926 // Note if using SQL Server it is best to use rowversion as the modified value for the Orders table,
@@ -52,7 +59,7 @@ protected override async Task<List<RpdeItem>> GetRPDEItems(string clientId, long
5259 Modified = result . OrderTable . OrderModified ,
5360 State = result . OrderTable . Deleted || result . OrderTable . VisibleInOrdersFeed == FeedVisibility . Archived ? RpdeState . Deleted : RpdeState . Updated ,
5461 Data = result . OrderTable . Deleted || result . OrderTable . VisibleInOrdersFeed == FeedVisibility . Archived ? null :
55- AcmeOrderStore . RenderOrderFromDatabaseResult ( RenderOrderId ( result . OrderTable . OrderMode == OrderMode . Proposal ? OrderType . OrderProposal : OrderType . Order , new Guid ( result . OrderTable . OrderId ) ) , result . OrderTable ,
62+ AcmeOrderStore . RenderOrderFromDatabaseResult ( RenderOrderId ( result . OrderTable . OrderMode == OrderMode . Proposal ? OrderType . OrderProposal : OrderType . Order , new Guid ( result . OrderTable . OrderId ) ) , result . OrderTable , _appSettings . FeatureFlags . PrepaymentAlwaysRequired ,
5663 result . OrderItemsTable . Select ( orderItem => new OrderItem
5764 {
5865 Id = RenderOrderItemId ( OrderType . Order , new Guid ( result . OrderTable . OrderId ) , orderItem . Id ) ,
@@ -110,6 +117,13 @@ public class AcmeOrderProposalsFeedRpdeGenerator : OrdersRPDEFeedModifiedTimesta
110117 {
111118 //public override string FeedPath { get; protected set; } = "example path override";
112119
120+ private readonly AppSettings _appSettings ;
121+
122+ public AcmeOrderProposalsFeedRpdeGenerator ( AppSettings appSettings )
123+ {
124+ _appSettings = appSettings ;
125+ }
126+
113127 protected override async Task < List < RpdeItem > > GetRPDEItems ( string clientId , long ? afterTimestamp , string afterId )
114128 {
115129 using ( var db = FakeBookingSystem . Database . Mem . Database . Open ( ) )
@@ -144,7 +158,7 @@ protected override async Task<List<RpdeItem>> GetRPDEItems(string clientId, long
144158 Modified = result . OrderTable . OrderProposalModified ,
145159 State = result . OrderTable . Deleted || result . OrderTable . VisibleInOrderProposalsFeed == FeedVisibility . Archived ? RpdeState . Deleted : RpdeState . Updated ,
146160 Data = result . OrderTable . Deleted || result . OrderTable . VisibleInOrderProposalsFeed == FeedVisibility . Archived ? null :
147- AcmeOrderStore . RenderOrderFromDatabaseResult ( RenderOrderId ( result . OrderTable . OrderMode == OrderMode . Proposal ? OrderType . OrderProposal : OrderType . Order , new Guid ( result . OrderTable . OrderId ) ) , result . OrderTable ,
161+ AcmeOrderStore . RenderOrderFromDatabaseResult ( RenderOrderId ( result . OrderTable . OrderMode == OrderMode . Proposal ? OrderType . OrderProposal : OrderType . Order , new Guid ( result . OrderTable . OrderId ) ) , result . OrderTable , _appSettings . FeatureFlags . PrepaymentAlwaysRequired ,
148162 result . OrderItemsTable . Select ( orderItem => new OrderItem
149163 {
150164 Id = RenderOrderItemId ( OrderType . Order , new Guid ( result . OrderTable . OrderId ) , orderItem . Id ) ,
0 commit comments