CairoExplorer.FileToIconConverter.addToDic C# (CSharp) Метод

addToDic() приватный Метод

private addToDic ( string fileName, IconSize size ) : System.Windows.Media.ImageSource
fileName string
size IconSize
Результат System.Windows.Media.ImageSource
        private ImageSource addToDic(string fileName, IconSize size)
        {
            string key = returnKey(fileName, size);

            if (size == IconSize.thumbnail || isExecutable(fileName))
            {
                if (!thumbDic.ContainsKey(key))
                    lock (thumbDic)
                        thumbDic.Add(key, getImage(fileName, size));

                return thumbDic[key];
            }
            else
            {
                if (!iconDic.ContainsKey(key))
                    lock (iconDic)
                        iconDic.Add(key, getImage(fileName, size));
                return iconDic[key];
            }

        }