using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WinRT.BxlComponent.Plugin.BxlMpXamarinSDK
{
    internal static class DebugHelper
    {
        //this dictionary should use weak key references
        static Dictionary<object, uint> d = new Dictionary<object, uint>();
        static uint gid = 0;

        public static string GetId(this object o)
        {
            uint id = 0;
            if (d.ContainsKey(o))
            {
                id = d[o];
            }
            else
            {
                id = gid++;
            }
            return id.ToString();
        }
    }
}
