Nessuna descrizione
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Symbols.cs 815B

123456789101112131415161718192021222324252627282930
  1. /*---------------------------------------------------------------------------------------------
  2. * Copyright (c) Microsoft Corporation. All rights reserved.
  3. * Licensed under the MIT License. See License.txt in the project root for license information.
  4. *--------------------------------------------------------------------------------------------*/
  5. using System;
  6. using System.IO;
  7. namespace Microsoft.Unity.VisualStudio.Editor
  8. {
  9. internal static class Symbols
  10. {
  11. public static bool IsPortableSymbolFile(string pdbFile)
  12. {
  13. try
  14. {
  15. using (var stream = File.OpenRead(pdbFile))
  16. {
  17. return stream.ReadByte() == 'B'
  18. && stream.ReadByte() == 'S'
  19. && stream.ReadByte() == 'J'
  20. && stream.ReadByte() == 'B';
  21. }
  22. }
  23. catch (Exception)
  24. {
  25. return false;
  26. }
  27. }
  28. }
  29. }