示例#1
0
 public PartialMatch(Person person, IMatcherFramework framework, IModel model)
     : base(framework)
 {
     this.person = person;
     this.State  = PartialMatchState.ReadyToStart;
     this.model  = model;
 }
示例#2
0
 public PartialMatchBase(IMatcherFramework framework)
 {
     this.framework    = framework;
     this.cts          = new CancellationTokenSource();
     this.pattern      = PatternFactory.CreateUnmatched();
     this.matcherFuncs = new List <MatcherFunc>
     {
         TryMatchGroupLeader,
         TryMatchCommunityScore,
         TryMatchActiveMemebership,
         TryMatchActiveMembershipForSemesterValuation,
     };
 }
示例#3
0
        public RemotePartialMatch(Guid sessionId, INode node, Pattern pattern, IMatcherFramework framework)
            : base(framework)
        {
            this.sessionId = sessionId;
            this.node      = node;
            this.pattern   = pattern;

            if (string.IsNullOrEmpty(pattern.CurrentPatternNodeName))
            {
                throw new InvalidOperationException("pattern.CurrentPatternNodeName cannot be empty");
            }

            matcherFuncs = new Dictionary <string, MatcherFunc> {
                { PatternNodes.GroupLeader, TryMatchGroupLeader },
                { PatternNodes.CommunityScore, TryMatchCommunityScore },
                { PatternNodes.ActiveMembership1, TryMatchActiveMembershipForSemesterValuation },
                { PatternNodes.Group1, TryMatchGroupForSemesterValuation },
                { PatternNodes.SemesterValuation, TryMatchSemesterValuation },
                { PatternNodes.SemesterValuationNext, TryMatchNextSemesterValuation },
                { PatternNodes.ActiveMembership2, TryMatchActiveMemebership },
                { PatternNodes.Group2, TryMatchGroup },
            };
        }
示例#4
0
 public override void Initialize(IMatcherFramework framework)
 {
     base.Initialize(framework);
     this.framework = framework;
 }
示例#5
0
 public void Initialize(IMatcherFramework framework)
 {
     Console.WriteLine("Hello from local matcher!");
 }
示例#6
0
 public virtual void Initialize(IMatcherFramework framework)
 {
     this.pattern = CreateUnmatchedPattern();
 }
 public void Initialize(IMatcherFramework framework)
 {
     this.framework = framework;
 }