Example #1
0
        /// <summary>
        /// 根据分类名称,获得一个本地数据
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        public StorageData GetData(string name)
        {
            StorageData data = null;

            if (!_datas.TryGetValue(name, out data))
            {
                lock (_datas)
                {
                    if (!_datas.TryGetValue(name, out data))
                    {
                        data = new StorageData();
                        _datas.Add(name, data);
                    }
                }
            }
            return(data);
        }
Example #2
0
 private void IsLoaded(StorageData local, bool value)
 {
     local.Save(_loadedPinnedDataId, value ? _placeholderValue : null);
 }
Example #3
0
 private bool IsLoaded(StorageData local)
 {
     return(local.Load(_loadedPinnedDataId) == null ? false : true);
 }