You've already forked linux-packaging-mono
Imported Upstream version 4.8.0.309
Former-commit-id: 5f9c6ae75f295e057a7d2971f3a6df4656fa8850
This commit is contained in:
parent
ee1447783b
commit
94b2861243
40
external/cecil-legacy/symbols/pdb/Microsoft.Cci.Pdb/PdbReader.cs
vendored
Normal file
40
external/cecil-legacy/symbols/pdb/Microsoft.Cci.Pdb/PdbReader.cs
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
// This code is licensed under the Microsoft Public License.
|
||||
// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
|
||||
// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
|
||||
// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
|
||||
// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace Microsoft.Cci.Pdb {
|
||||
internal class PdbReader {
|
||||
internal PdbReader(Stream reader, int pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
this.reader = reader;
|
||||
}
|
||||
|
||||
internal void Seek(int page, int offset) {
|
||||
reader.Seek(page * pageSize + offset, SeekOrigin.Begin);
|
||||
}
|
||||
|
||||
internal void Read(byte[] bytes, int offset, int count) {
|
||||
reader.Read(bytes, offset, count);
|
||||
}
|
||||
|
||||
internal int PagesFromSize(int size) {
|
||||
return (size + pageSize - 1) / (pageSize);
|
||||
}
|
||||
|
||||
//internal int PageSize {
|
||||
// get { return pageSize; }
|
||||
//}
|
||||
|
||||
internal readonly int pageSize;
|
||||
internal readonly Stream reader;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user