示例#1
0
 public void CopyFrom(NuclearStorage source, params string[] buckets)
 {
     foreach (var bucket in buckets)
     {
         Container.WriteContents(bucket, source.Container.EnumerateContents(bucket));
     }
 }
示例#2
0
 public static TEntity UpdateEntityEnforcingNew <TEntity>(this NuclearStorage storage, object key,
                                                          Action <TEntity> update)
     where TEntity : new()
 {
     return(storage.Container.GetWriter <object, TEntity>().UpdateEnforcingNew(key, update));
 }
示例#3
0
 public static TSingleton UpdateSingletonEnforcingNew <TSingleton>(this NuclearStorage storage,
                                                                   Action <TSingleton> update)
     where TSingleton : new()
 {
     return(storage.Container.GetWriter <unit, TSingleton>().UpdateEnforcingNew(unit.it, update));
 }
 public static TSingleton UpdateSingleton <TSingleton>(this NuclearStorage storage, Action <TSingleton> update)
     where TSingleton : new()
 {
     return(storage.Factory.GetEntityWriter <unit, TSingleton>().UpdateEnforcingNew(unit.it, update));
 }