public uint PinDataToHandle(object obj) { foreach (var x in _resolve) { if (x.Value.Object == obj) { x.Value.ReferenceCount++; return(x.Key); } } var handle = GetFreeHandle(); _resolve[handle] = new UserDataPin(obj); _resolve[handle].ReferenceCount++; return(handle); }
public uint PinDataToHandle(object obj) { foreach (var x in _resolve) { if (x.Value.Object == obj) { x.Value.ReferenceCount++; return x.Key; } } var handle = GetFreeHandle(); _resolve[handle] = new UserDataPin(obj); _resolve[handle].ReferenceCount++; return handle; }