public static Flowchart <T, R> RequiresField <T, R>(this Flowchart <T, R> chart, Expression <Func <T, object> > field) { var specifier = new PropertySpecifier <T>(field); chart.LastShape().RequiredField = specifier; return(chart); }
private void OnMessagesCollected(MessageCollection <SelectedModelObjectChanged, DeleteItemRequested> set) { set.MarkAsConsumed(set.Message2); CommunityModel model = null; PropertySpecifier property = null; if (set.Message1.SelectedObject is AgentModel agent) { model = agent.ContainingPackage; property = new PackageAgentsProperty(); } else if (set.Message1.SelectedObject is MessageModel message) { model = message.ContainingPackage; property = new PackageMessagesProperty(); } if (model != null) { OnMessage(new ModificationRequest(set, new Modification(ModificationType.Remove, set.Message1.SelectedObject, null, model, property))); } }
public Modification(ModificationType modificationType, object oldValue, object newValue, object target, PropertySpecifier property) { ModificationType = modificationType; OldValue = oldValue; NewValue = newValue; Target = target; Property = property; }
private void AddEvent(string @event, PropertySpecifier propertySpecifier, AgentModel oldModel) { if (string.IsNullOrEmpty(@event)) { return; } OnMessage(new ModificationRequest(latestData.Item2, new Modification(ModificationType.Add, null, @event, oldModel, propertySpecifier))); }
protected bool Equals(PropertySpecifier other) { return(propertyName == other.propertyName); }