Beispiel #1
0
 // -------------------------------------------------------------------------------
 // BuildCache
 // called when the dictionary is accessed the first time in order to build it
 // BuildCache can be called manually as well to load the dictionary
 // -------------------------------------------------------------------------------
 public static void BuildCache(bool forced = false)
 {
     if (_data == null || forced)
     {
         _data = new FooTemplateDictionary(FooTemplate._folderName);
     }
 }
Beispiel #2
0
        // -------------------------------------------------------------------------------
        // OnEnable
        // We have to cache the folder name here (and not on the base class),
        // otherwise it would be the same for all objects
        // -------------------------------------------------------------------------------
        public void OnEnable()
        {
            if (_folderName != folderName)
            {
                _folderName = folderName;
            }

            _data = null;
        }