示例#1
0
        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);
        }
示例#2
0
        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)));
            }
        }
示例#3
0
 public Modification(ModificationType modificationType, object oldValue, object newValue,
                     object target, PropertySpecifier property)
 {
     ModificationType = modificationType;
     OldValue         = oldValue;
     NewValue         = newValue;
     Target           = target;
     Property         = property;
 }
示例#4
0
        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)));
        }
示例#5
0
 protected bool Equals(PropertySpecifier other)
 {
     return(propertyName == other.propertyName);
 }