Skip to content

Commit

Permalink
Add way to get the messages out, duh
Browse files Browse the repository at this point in the history
  • Loading branch information
mavickers committed Sep 2, 2022
1 parent c9f454e commit 6c658df
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Cargo/Cargo.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
<PackageTags>COR</PackageTags>
<Description>A lightweight chain of responsibility library for .Net.</Description>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<Version>2.0.2</Version>
<AssemblyVersion>2.0.2.0</AssemblyVersion>
<FileVersion>2.0.2.0</FileVersion>
<Version>2.0.2.1</Version>
<AssemblyVersion>2.0.2.1</AssemblyVersion>
<FileVersion>2.0.2.1</FileVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Cargo/Package.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;

namespace LightPath.Cargo
Expand Down Expand Up @@ -31,6 +30,7 @@ public class Package<TContent> where TContent : class
public Station.Result LastStationResult => Results?.LastOrDefault();
public List<Station.Result> Results { get; }
internal readonly Dictionary<Type, object> Services;
public IList<string> Messages => _messages.AsReadOnly();

private Package(params object[] parameters)
{
Expand Down
2 changes: 2 additions & 0 deletions Cargo/Station.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ public TService GetService<TService>()
return (TService)_package.Services[typeof(TService)];
}

public IList<string> Messages => _package.Messages;

public void Trace(string message) => _package.Trace(message);

public bool TryGetService<TService>(out TService output) where TService : class
Expand Down

0 comments on commit 6c658df

Please sign in to comment.