Пример #1
0
 internal TraceHandler(
     TargetClientConfig clientConfig,
     IRuleLoader ruleLoader,
     OnDeviceDecisioningRuleSet ruleSet,
     TargetDeliveryRequest request)
 {
     this.ruleSet = ruleSet;
     this.trace   = new Dictionary <string, object>
     {
         { ClientCodeKey, clientConfig.Client },
         { ArtifactKey, this.ArtifactTrace(ruleLoader) },
         { ProfileKey, ProfileTrace(request.DeliveryRequest.Id) },
     };
     this.campaigns        = new Dictionary <long, IDictionary <string, object> >();
     this.evaluatedTargets = new Dictionary <long, IDictionary <string, object> >();
 }
Пример #2
0
 // TODO: Singleton from StructureMap.
 // TODO: Also send the siteId.
 public RuleEngine(IRuleLoader ruleLoader)
 {
     _allRules = ruleLoader.LoadRules();
 }
Пример #3
0
 /// <summary>
 /// Gets rule set for specified project (TODO: read project configuration).
 /// </summary>
 static IEnumerable <IRule> GetRuleSet(DotNetProject project, IRuleLoader ruleLoader)
 {
     // TODO: retrieve rule set from project configuration
     return(ruleLoader.GetRules());
 }
Пример #4
0
		/// <summary>
		/// Gets rule set for specified project (TODO: read project configuration).
		/// </summary>
		static IEnumerable<IRule> GetRuleSet (DotNetProject project, IRuleLoader ruleLoader)
		{
			// TODO: retrieve rule set from project configuration
			return ruleLoader.GetRules ();
		}
 public HotspotConfiguration(IRuleLoader ruleLoader) => this.ruleLoader = ruleLoader;