MapEditor.GraphicsDeviceServiceMiniMap.AddRef C# (CSharp) Method

AddRef() public static method

Gets a reference to the singleton instance.
public static AddRef ( IntPtr windowHandle, int width, int height ) : GraphicsDeviceServiceMiniMap
windowHandle System.IntPtr
width int
height int
return GraphicsDeviceServiceMiniMap
        public static GraphicsDeviceServiceMiniMap AddRef(IntPtr windowHandle,
                                                   int width, int height)
        {
            // Increment the "how many controls sharing the device" reference count.
            if (Interlocked.Increment(ref referenceCount) == 1)
            {
                // If this is the first control to start using the
                // device, we must create the singleton instance.
                singletonInstance = new GraphicsDeviceServiceMiniMap(windowHandle,
                                                              width, height);
            }

            return singletonInstance;
        }