-
-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #198 from tomasmcguinness/interface-for-testing
Add `IPassGenerator` interface for DI and testing
- Loading branch information
Showing
3 changed files
with
106 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace Passbook.Generator; | ||
|
||
public interface IPassGenerator | ||
{ | ||
/// <summary> | ||
/// Creates a byte array which contains one pkpass file | ||
/// </summary> | ||
/// <param name="generatorRequest"> | ||
/// An instance of a PassGeneratorRequest</param> | ||
/// <returns> | ||
/// A byte array which contains a zipped pkpass file. | ||
/// </returns> | ||
public byte[] Generate(PassGeneratorRequest generatorRequest); | ||
|
||
/// <summary> | ||
/// Creates a byte array that can contains a .pkpasses file for bundling multiple passes together | ||
/// </summary> | ||
/// <param name="generatorRequests"> | ||
/// A list of PassGeneratorRequest objects | ||
/// </param> | ||
/// <returns> | ||
/// A byte array which contains a zipped pkpasses file. | ||
/// </returns> | ||
public byte[] Generate(IReadOnlyList<PassGeneratorRequest> generatorRequests); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters