/// <summary> /// Invoke the given action on a cached buffer. /// </summary> public static void BufferInvoke <BufferType>(Action <BufferType> action) where BufferType : HeapBuffer { var wrapper = new ActionWrapper <BufferType> { Action = action }; BufferInvoke <ActionWrapper <BufferType>, BufferType>(ref wrapper); }
/// <summary> /// Invoke the given action on a cached buffer. /// </summary> public static void BufferInvoke <TBuffer>(Action <TBuffer> action) where TBuffer : HeapBuffer { var wrapper = new ActionWrapper <TBuffer> { Action = action }; BufferInvoke <ActionWrapper <TBuffer>, TBuffer>(ref wrapper); }