Skip to content

Commit 007ad2a

Browse files
committed
Spelling
1 parent 05bd76d commit 007ad2a

File tree

3 files changed

+57
-57
lines changed

3 files changed

+57
-57
lines changed

eCommerce.WebService/App_Start/WebRequestCorrelationIdentifier.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ public class WebRequestCorrelationIdentifier : IRequestCorrelationIdentifier
1313
public WebRequestCorrelationIdentifier()
1414
{
1515
/* #Customise your correlation ID here
16-
* More request identification varibles you add easier
16+
* More request identification variables you add easier
1717
* it's going to be to find the relevant W3C request when you hash it
1818
*
19-
* Below is just an example of varibles and hash algorithm that you can use:
19+
* Below is just an example of variables and hash algorithm that you can use:
2020
*/
2121
string rawCorrelationID = string.Join("_",
2222
HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"],
Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
using eCommerce.Helpers.Logging;
2-
using System;
3-
using System.Collections.Generic;
4-
using System.Linq;
5-
using System.Text;
6-
7-
namespace eCommerce.Helpers.Domain
8-
{
9-
public abstract class DomainEvent
10-
{
11-
public string Type { get { return this.GetType().Name; } }
12-
13-
public DateTime Created { get; private set; }
14-
15-
public Dictionary<string, Object> Args { get; private set; }
16-
17-
public string CorrelationID { get; set; }
18-
19-
public DomainEvent()
20-
{
21-
this.Created = DateTime.Now;
22-
this.Args = new Dictionary<string, Object>();
23-
}
24-
25-
public abstract void Flatten();
26-
}
27-
}
2+
using System;
3+
using System.Collections.Generic;
4+
using System.Linq;
5+
using System.Text;
6+
7+
namespace eCommerce.Helpers.Domain
8+
{
9+
public abstract class DomainEvent
10+
{
11+
public string Type { get { return this.GetType().Name; } }
12+
13+
public DateTime Created { get; private set; }
14+
15+
public Dictionary<string, Object> Args { get; private set; }
16+
17+
public string CorrelationID { get; set; }
18+
19+
public DomainEvent()
20+
{
21+
this.Created = DateTime.Now;
22+
this.Args = new Dictionary<string, Object>();
23+
}
24+
25+
public abstract void Flatten();
26+
}
27+
}
Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
using eCommerce.Helpers.Logging;
2-
using eCommerce.Helpers.Repository;
3-
using System;
4-
using System.Collections.Generic;
5-
using System.Linq;
6-
using System.Text;
7-
8-
namespace eCommerce.Helpers.Domain
9-
{
10-
public class DomainEventHandle<TDomainEvent> : Handles<TDomainEvent>
11-
where TDomainEvent : DomainEvent
12-
{
13-
IDomainEventRepository domainEventRepository;
14-
IRequestCorrelationIdentifier requestCorrelationIdentifier;
15-
16-
public DomainEventHandle(IDomainEventRepository domainEventRepository,
17-
IRequestCorrelationIdentifier requestCorrelationIdentifier)
18-
{
19-
this.domainEventRepository = domainEventRepository;
20-
this.requestCorrelationIdentifier = requestCorrelationIdentifier;
21-
}
22-
23-
public void Handle(TDomainEvent @event)
24-
{
25-
@event.Flatten();
26-
@event.CorrelationID = this.requestCorrelationIdentifier.CorrelationID;
27-
this.domainEventRepository.Add(@event);
28-
}
29-
}
30-
}
2+
using eCommerce.Helpers.Repository;
3+
using System;
4+
using System.Collections.Generic;
5+
using System.Linq;
6+
using System.Text;
7+
8+
namespace eCommerce.Helpers.Domain
9+
{
10+
public class DomainEventHandle<TDomainEvent> : Handles<TDomainEvent>
11+
where TDomainEvent : DomainEvent
12+
{
13+
IDomainEventRepository domainEventRepository;
14+
IRequestCorrelationIdentifier requestCorrelationIdentifier;
15+
16+
public DomainEventHandle(IDomainEventRepository domainEventRepository,
17+
IRequestCorrelationIdentifier requestCorrelationIdentifier)
18+
{
19+
this.domainEventRepository = domainEventRepository;
20+
this.requestCorrelationIdentifier = requestCorrelationIdentifier;
21+
}
22+
23+
public void Handle(TDomainEvent @event)
24+
{
25+
@event.Flatten();
26+
@event.CorrelationID = this.requestCorrelationIdentifier.CorrelationID;
27+
this.domainEventRepository.Add(@event);
28+
}
29+
}
30+
}

0 commit comments

Comments
 (0)