x) Added enum for CommitResults x) Created interface IID<TS> x) Implemented DB class with lock, objects, committed lists x) Updated lookup and checkout methods in DB class x) Added TxStates enum and implemented Tx class with checkout, add, dispose methods x) Implemented commit method in DB class to handle transactions efficiently
36 lines
857 B
C#
36 lines
857 B
C#
using System.Collections.Generic;
|
|
|
|
namespace Tracing
|
|
{
|
|
// Contains the mapping between type ID received by SampleObjectAllocation(Low/High) events
|
|
// and their name received by TypeBulkType events
|
|
public class ProcessTypeMapping
|
|
{
|
|
private readonly Dictionary<ulong, string> _typesIdToName;
|
|
|
|
public ProcessTypeMapping(int processId)
|
|
{
|
|
ProcessId = processId;
|
|
_typesIdToName = new Dictionary<ulong, string>();
|
|
}
|
|
|
|
public int ProcessId { get; set; }
|
|
|
|
public string this[ulong id]
|
|
{
|
|
get
|
|
{
|
|
if (!_typesIdToName.ContainsKey(id))
|
|
return null;
|
|
|
|
return _typesIdToName[id];
|
|
}
|
|
set
|
|
{
|
|
_typesIdToName[id] = value;
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|