コード例 #1
0
 public LaceDataProvider(DataProviderName name, IEnumerable<IAmRequestField> requestFields, decimal costPrice, decimal recommendedPrice,
     IHaveUser user, string packageName, IBuildRequestTypes requestTypes)
 {
     Name = name;
     var requestType = requestTypes.RequestTypes.FirstOrDefault(w => w.Key == name);
     if (requestType.Value != null)
         Request = new[] {requestType.Value(requestFields.ToList(), user, packageName)};
     CostPrice = costPrice;
     RecommendedPrice = recommendedPrice;
 }
コード例 #2
0
 public static IBillStateIndicator GetBillStateForDataProvider(DataProviderName dataProvider)
 {
     var nonBillable = BillStates.Where(w => w.Key == dataProvider).ToList();
     return !nonBillable.Any() ? new DataProviderBillState(DataProviderNoRecordState.Billable) : nonBillable.FirstOrDefault().Value();
 }