tomasmcguinness / dotnet-passbook

A .Net Library for generating Apple Passbook (Wallet) files for iOS. Please get involved by creating pull requests and opening issues!
MIT License
319 stars 117 forks source link

Public access to Pass.packagePathAndName #9

Closed NicoDG-BE closed 12 years ago

NicoDG-BE commented 12 years ago

Currently Pass.packagePathAndName is private which does not allow to identify the temporary file and clean up the file after pass generation.

Suggestion: Add a public getter property for packagePathAndName.

tomasmcguinness commented 12 years ago

Thanks. I’ll add that in my next update.

Sent from Windows Mail

From: NicoDG-BE Sent: ‎12‎ ‎October‎ ‎2012 ‎15‎:‎48 To: tomasmcguinness/dotnet-passbook Subject: [dotnet-passbook] Public access to Pass.packagePathAndName (#9)

Currently Pass.packagePathAndName is private which does not allow to identify the temporary file and clean up the file after pass generation.

Suggestion: Add a public getter property for packagePathAndName.

— Reply to this email directly or view it on GitHub.

tomasmcguinness commented 12 years ago

I have added a new property to the Pass class called PackageDirectory. This exposes a path to the temporary folder.

I have updated the sample pass generators to reflect this.

try { return new FileContentResult(generatedPass.GetPackage(), "application/vnd.apple.pkpass"); } finally { Directory.Delete(generatedPass.PackageDirectory, true); }