Esempio n. 1
0
        public static void registerStorage(System.String storageKey, System.String storageName, System.Type type)
        {
            if (storageFactory == null)
            {
                throw new System.SystemException("No storage factory has been set; I don't know what kind of storage utility to create. Either set a storage factory, or register your StorageUtilitys directly.");
            }

            registerStorage(storageKey, storageFactory.newStorage(storageName, type));
        }
Esempio n. 2
0
 /**
  * Create a new wrapping StorageUtility
  *
  * @param name unique name for underlying StorageUtility
  * @param wrapper serialization wrapper
  * @param storageFactory factory to create underlying StorageUtility
  */
 public WrappingStorageUtility(String name, SerializationWrapper wrapper, IStorageFactory storageFactory)
 {
     this.storage = storageFactory.newStorage(name, wrapper.GetType());
     this.wrapper = wrapper;
 }
 /// <summary> Create a new wrapping StorageUtility</summary>
 /// <param name="name">unique name for underlying StorageUtility
 /// </param>
 /// <param name="wrapper">serialization wrapper
 /// </param>
 /// <param name="storageFactory">factory to create underlying StorageUtility
 /// </param>
 public WrappingStorageUtility(System.String name, WrappingStorageUtility.SerializationWrapper wrapper, IStorageFactory storageFactory)
 {
     InitBlock();
     this.storage = storageFactory.newStorage(name, wrapper.GetType());
     this.wrapper = wrapper;
 }