-
-
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.
Add
IPassGenerator
interface for DI and testing
Conform to the `IPassGenerator` interface in `PassGenerator` to allow for dependency injection and testing. Write a simple section in README to explain the purpose of the interface and how to use it.
- Loading branch information
Showing
3 changed files
with
102 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,23 @@ | ||
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