Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Commit

Permalink
refactor: typo
Browse files Browse the repository at this point in the history
  • Loading branch information
ElderJames committed Sep 1, 2019
1 parent 4de98d2 commit ad0b4a8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Shriek.ServiceProxy.Socket.Core.Internal
/// </summary>
internal class DefaultDependencyResolver : IDependencyResolver
{
private ICollection<Type> serviceTypes;
private readonly ICollection<Type> serviceTypes = new List<Type>();

/// <summary>
/// 解析支持任意对象创建的一次注册的服务
Expand Down
4 changes: 2 additions & 2 deletions src/Shriek/Commands/DefaultCommandContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ public void SaveAggregateRoot<TAggregateRoot>(TAggregateRoot aggregate)
//如果不是新增事件
if (aggregate.Version != 0)
{
var lastestEvent = eventStorage.GetLastEvent(((dynamic)aggregate).AggregateId);
if (lastestEvent != null && lastestEvent.Version != aggregate.Version)
var lastEvent = eventStorage.GetLastEvent(((dynamic)aggregate).AggregateId);
if (lastEvent != null && lastEvent.Version != aggregate.Version)
{
throw new Exception("事件库中该聚合的状态版本与当前传入聚合状态版本不同,可能已被更新");
}
Expand Down
4 changes: 4 additions & 0 deletions src/Shriek/Exceptions/DomainException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,9 @@ public class DomainException : Exception
public DomainException(string msg) : base(msg)
{
}

public DomainException(string message, Exception innerException) : base(message, innerException)
{
}
}
}

0 comments on commit ad0b4a8

Please sign in to comment.