示例#1
0
 public NoteEvoker(Labor sender, Labor recipient, List<Labor> relayLabors)
 {
     Sender = sender;
     SenderName = sender.Laborer.LaborerName;
     Recipient = recipient;
     RecipientName = recipient.Laborer.LaborerName;
     SystemCode = new Usid(($"{SenderName}.{RecipientName}").GetHashKey());
     RelationLabors = relayLabors;
     RelationNames.AddRange(RelationLabors.Select(rn => rn.Laborer.LaborerName));
 }
示例#2
0
 public NoteEvoker(Labor sender, string recipientName, IList<Labor> relayLabors)
 {
     Sender = sender;
     SenderName = sender.Laborer.LaborerName;
     RecipientName = recipientName;
     SystemCode = new Usid(($"{SenderName}.{RecipientName}").GetHashKey());
     List<Labor> objvl = Sender.Scope.Subjects.AsCards()
                                 .Where(m => m.Value.Labors.ContainsKey(recipientName))
                                     .SelectMany(os => os.Value.Labors.AsCards().Select(o => o.Value)).ToList();
     if (objvl.Any())
         Recipient = objvl.First();
     RelationLabors = new List<Labor>(relayLabors);
     RelationNames.AddRange(RelationLabors.Select(rn => rn.Laborer.LaborerName));
 }