C# Class Imager.cRGBCache

A little cache that holds calculation results based on the three color components red, green and blue.
Show file Open project: soywiz/cspspemu

Public Methods

Method Description
GetOrAdd ( UInt32 key, byte>.Func factory ) : byte

Gets a value directly from the cache or first calculates that value and writes it the cache.

Method Details

GetOrAdd() public method

Gets a value directly from the cache or first calculates that value and writes it the cache.
public GetOrAdd ( UInt32 key, byte>.Func factory ) : byte
key System.UInt32 The 32-bit color code.
factory byte>.Func The factory that would calculate a result if it's not already in the cache.
return byte