PageRenderTime 53ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/Passbook.Generator/Pass.cs

https://github.com/Comezon/dotnet-passbook
C# | 30 lines | 26 code | 4 blank | 0 comment | 0 complexity | 4d3fd418e9d78896ede4a5ff5949dc85 MD5 | raw file
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace Passbook.Generator
  8. {
  9. public class Pass
  10. {
  11. private string packagePathAndName;
  12. public Pass(string packagePathAndName)
  13. {
  14. this.packagePathAndName = packagePathAndName;
  15. }
  16. public byte[] GetPackage()
  17. {
  18. byte[] contents = File.ReadAllBytes(packagePathAndName);
  19. return contents;
  20. }
  21. public string PackageDirectory
  22. {
  23. get { return Path.GetDirectoryName(this.packagePathAndName); }
  24. }
  25. }
  26. }