コード例 #1
0
        public string Execute(IQueryResultset queryResultset)
        {
            var salutation = queryResultset.GetQueryResult <GetSalutationQuery, string>();
            var fullName   = queryResultset.GetQueryResult <GetFullNameQuery, string>();

            return($"{salutation} {fullName}");
        }
コード例 #2
0
        private static void RunAllKnownQueries(IQueryRuntime queryRuntime, Person person)
        {
            Console.WriteLine("\nRunning all known queries....");

            IQueryResultset queryResultset = queryRuntime.RunAllQueries(person);

            string salutation = queryResultset.GetQueryResult <GetSalutationQuery, string>();

            Console.WriteLine($"Salutation : {salutation}");

            string fullName = queryResultset.GetQueryResult <GetFullNameQuery, string>();

            Console.WriteLine($"Full name: {fullName}");
        }