Exemple #1
0
        /// <summary>Executes the command.</summary>
        /// <param name="actionInput">The full input specified for executing the command.</param>
        public override void Execute(ActionInput actionInput)
        {
            IController sender    = actionInput.Controller;
            TypoEntry   typoEntry = new TypoEntry
            {
                Note                = actionInput.Tail,
                PlaceID             = player.Parent.Id,
                SubmittedByPlayerID = player.Id,
                SubmittedDateTime   = DateTime.Now,
                Resolved            = false
            };

            typoEntry.Save();

            sender.Write("Thank you.  Your typo report has been submitted.");
        }
Exemple #2
0
        /// <summary>Executes the command.</summary>
        /// <param name="actionInput">The full input specified for executing the command.</param>
        public override void Execute(ActionInput actionInput)
        {
            var typoEntry = new TypoEntry
            {
                Note                = actionInput.Tail,
                PlaceID             = player.Parent.Id,
                SubmittedByPlayerID = player.Id,
                SubmittedDateTime   = DateTime.Now,
                Resolved            = false
            };

            typoEntry.Save();

            actionInput.Controller.Write(new OutputBuilder().
                                         AppendLine("Thank you. Your typo report has been submitted."));
        }
Exemple #3
0
        /// <summary>Executes the command.</summary>
        /// <param name="actionInput">The full input specified for executing the command.</param>
        public override void Execute(ActionInput actionInput)
        {
            var session = actionInput.Session;

            if (session == null)
            {
                return;                  // This action only makes sense for player sessions.
            }
            var typoEntry = new TypoEntry
            {
                Note                = actionInput.Tail,
                PlaceID             = player.Parent.Id,
                SubmittedByPlayerID = player.Id,
                SubmittedDateTime   = DateTime.Now,
                Resolved            = false
            };

            typoEntry.Save();

            session.WriteLine("Thank you. Your typo report has been submitted.");
        }