示例#1
0
 static void Main(string[] args)
 {
     var wf = from createReplyResult in BoundedContextDSL.ValidateReply(100, 1, "testaslkdhfkjsdfhgdkjfghjdfkgh")
              let validReply = (CreateReplyResult.ReplyValid) createReplyResult
                               from checkLanguageResult in BoundedContextDSL.CheckLanguage(validReply.Reply.Answer)
                               from ownerAck in BoundedContextDSL.SendAckToOwner(checkLanguageResult)
                               from authorAck in BoundedContextDSL.SendAckToAuthor(checkLanguageResult)
                               select(validReply, checkLanguageResult, ownerAck, authorAck);
 }
示例#2
0
        static void Main(string[] args)
        {
            var wf = from createReplyResult in BoundedContextDSL.ValidateReply(100, 1, "mesaj de test")
                     let validReply = (CreateReplyResult.ReplyValid) createReplyResult
                                      from checkLanguageResult in BoundedContextDSL.CheckLanguage(validReply.Reply.Answer)
                                      from ownerAck in BoundedContextDSL.SendAckToOwner(checkLanguageResult)
                                      from authorAck in BoundedContextDSL.SendAckToAuthor(checkLanguageResult)
                                      select(validReply, checkLanguageResult, ownerAck, authorAck);

            Console.WriteLine("Hello World!");
        }
示例#3
0
        static void Main(string[] args)
        {
            var wf = from createReplyResult in BoundedContextDSL.ValidateReply(100, 1, "InternetOfThings")
                     let validReply = (CreateReplyResult.ReplyValid) createReplyResult
                                      from checkLanguageResult in BoundedContextDSL.CheckLanguage(validReply.Reply.Answer)
                                      from ownerAck in BoundedContextDSL.SendAckToOwner(checkLanguageResult)
                                      from authorAck in BoundedContextDSL.SendAckToAuthor(checkLanguageResult)
                                      select(validReply, checkLanguageResult, ownerAck, authorAck);

            var serviceProvider = new ServiceCollection()
                                  .AddOperations(typeof(ValidateReplyAdapter).Assembly)
                                  .AddOperations(typeof(CheckLanguageAdapter).Assembly)
                                  .AddOperations(typeof(SenAckToQuestionOwnerAdapter).Assembly)
                                  .AddTransient <IInterpreterAsync>(sp => new LiveInterpreterAsync(sp))
                                  .BuildServiceProvider();

            Console.WriteLine("Hello World!");
        }