示例#1
0
 public static IUMStorage CreateStorage(UMStorageType type)
 {
     switch (type)
     {
         case UMStorageType.Database:
             return new DatabaseUMStorage();
         case UMStorageType.FileSystem:
             throw new NotImplementedException();
         case UMStorageType.Mixed:
             throw new NotImplementedException();
         default:
             throw new Exception("Can't create storage of such type");
     }
 }
示例#2
0
        public static IUMStorage CreateStorage(UMStorageType type)
        {
            switch (type)
            {
            case UMStorageType.Database:
                return(new DatabaseUMStorage());

            case UMStorageType.FileSystem:
                throw new NotImplementedException();

            case UMStorageType.Mixed:
                throw new NotImplementedException();

            default:
                throw new Exception("Can't create storage of such type");
            }
        }