Exemplo n.º 1
0
        InstanceBox IPluginRepo.AddInstanceBox(Type type, InstanceBox box)
        {
            Validate.NotNull(box);

            InstanceBox prev;

            if (_instances.TryGetValue(type, out prev))
                return prev;

            _instances.Add(type, box);
            return box;
        }
Exemplo n.º 2
0
 InstanceBox IPluginRepo.AddInstanceBox(Type type, InstanceBox box)
 {
     lock (_mutex) return _impl.AddInstanceBox(type, box);
 }