コード例 #1
0
        public void Handle(FileUploaded msg)
        {
            using (var file = File.OpenRead(msg.Filename))
                using (StreamReader reader = new StreamReader(file))
                {
                    int    row = 0;
                    string line;
                    while ((line = reader.ReadLine()) != null)
                    {
                        var values = line.Split(new [] { ',' });
                        var report = new AbideReport
                        {
                            TradeId    = values[0],
                            ActionType = values[1],
                            OtherStuff = values[2]
                        };

                        Context.Parent.Tell(new NewAbideReport
                        {
                            Filename = msg.Filename,
                            Row      = row++,
                            Report   = report
                        });
                    }
                }

            Context.Parent.Tell(new EndOfFile
            {
                Filename = msg.Filename
            });
        }
コード例 #2
0
 protected ReportedActionCommand(AbideReport report)
 {
     AggregateId = report.TradeId;
 }
コード例 #3
0
 public abstract ReportedActionCommand GetCommand(AbideReport report);
コード例 #4
0
 public UnrecognizedCommand(AbideReport report) : base(report)
 {
 }
コード例 #5
0
 public override ReportedActionCommand GetCommand(AbideReport report)
 {
     return(new NewCommand(report));
 }
コード例 #6
0
ファイル: ModifyCommand.cs プロジェクト: 403016605/Akka.DDD
 public ModifyCommand(AbideReport report)
     : base(report)
 {
 }
コード例 #7
0
 public ImplicitPositionCommand(AbideReport report)
     : base(report)
 {
 }
コード例 #8
0
 public override ReportedActionCommand GetCommand(AbideReport report)
 {
     return(new UnrecognizedCommand(report));
 }
コード例 #9
0
 public CompressCommand(AbideReport report)
     : base(report)
 {
 }
コード例 #10
0
 public NewCommand(AbideReport report)
     : base(report)
 {
     SomeData = report.OtherStuff;
 }
コード例 #11
0
 public override ReportedActionCommand GetCommand(AbideReport report)
 {
     return(new ImplicitPositionCommand(report));
 }