Example #1
0
        public IterationResult(SymuEnvironment environment)
        {
            Environment               = environment ?? throw new ArgumentNullException(nameof(environment));
            OrganizationFlexibility   = new OrganizationFlexibility(Environment);
            KnowledgeAndBeliefResults = new KnowledgeAndBeliefResults(Environment);
            Blockers = new BlockerResults(Environment);
            Tasks    = new TaskResults(Environment);
            Messages = new MessageResults(Environment);

            Results.Add(OrganizationFlexibility);
            Results.Add(KnowledgeAndBeliefResults);
            Results.Add(Blockers);
            Results.Add(Tasks);
            Results.Add(Messages);
            Results.Add(KeyFrames);
        }
Example #2
0
        private static void Main(string[] args)
        {
            Console.WriteLine("Enter the Number of Messages to be sent by King Shan: ");

            var           noOfMessages = Convert.ToInt32(Console.ReadLine());
            List <String> messages     = new List <String>();

            Console.WriteLine("Enter the Kingdom Name and Message to be sent: ");

            for (int i = 0; i < noOfMessages; i++)
            {
                messages.Add(Console.ReadLine());
            }

            var ruler = new RulerAllies(messages, "King Shan");

            MessageResults.PrintMessageResults(ruler);
        }
    public virtual IMessageResults Publish <TEvent>(TEvent @event) where TEvent : IDomainEvent
    {
        var result   = new MessageResults();
        var handlers = this._scope.Resolve <IEnumerable <IEventHandler <TEvent> > >().ToList();

        if (!handlers.Any())
        {
            Trace.WriteLine(String.Format("No event handlers for event {0} ", typeof(TEvent)));
            result.AddResult(new MessageResult(true));
        }
        else
        {
            foreach (var eventHandler in handlers.Where(h => h.Handles(@event as IDomainEvent)))
            {
                eventHandler.Handle(@event);
            }
        }
        return(result);
    }
Example #4
0
 protected virtual void SendMessage(object sender, EventArgs e)
 {
     MessageResults?.Invoke(sender, e);
 }
 private void btnYes_Click(object sender, RoutedEventArgs e)
 {
     Result = MessageResults.Yes;
     canClose = true;
     Close();
 }
Example #6
0
 private void btnYes_Click(object sender, RoutedEventArgs e)
 {
     Result   = MessageResults.Yes;
     canClose = true;
     Close();
 }
Example #7
0
 private MessageDialogEx()
 {
     InitializeComponent();
     Result = MessageResults.Cancel;
 }
Example #8
0
 protected virtual void SendMessage(object sender, Information Information)
 {
     MessageResults?.Invoke(sender, Information);
 }