/******************************************************************************/ /* SlunkCrypt, by LoRd_MuldeR */ /* This work has been released under the CC0 1.0 Universal license! */ /******************************************************************************/ using System.Collections.Generic; using System.Collections.ObjectModel; namespace com.muldersoft.slunkcrypt.gui.utils { public static class DictionaryHelper { public static IReadOnlyDictionary ToReadOnlyDictionary(this IDictionary dict) { return (dict is ReadOnlyDictionary) ? ((ReadOnlyDictionary)dict) : new ReadOnlyDictionary(dict); } } }