Esempio n. 1
0
            public bool TryGetValue(string key, out object?value)
            {
                if (ApplicationDataContainerInterop.TryGetValue(_locality, key, out var innervalue))
                {
                    value = DataTypeSerializer.Deserialize(innervalue);
                    return(true);
                }

                value = null;
                return(false);
            }
Esempio n. 2
0
 public object?this[string key]
 {
     get
     {
         if (ApplicationDataContainerInterop.TryGetValue(_locality, key, out var value))
         {
             return(DataTypeSerializer.Deserialize(value));
         }
         return(null);
     }
     set
     {
         if (value != null)
         {
             ApplicationDataContainerInterop.SetValue(_locality, key, DataTypeSerializer.Serialize(value));
         }
         else
         {
             Remove(key);
         }
     }
 }