public static IStorageAdapter <T> BuildAdapter <T>(StorageType storageType, IHasConnectionConfiguration configuration)
        {
            switch (storageType)
            {
            case StorageType.XmlFileStorageType:
                return(new XmlStorageAdapter <T>(configuration));
            }

            throw new NotImplementedException($"Adapter of type {storageType:G} not supported");
        }
Пример #2
0
 public XmlStorageAdapter(IHasConnectionConfiguration configuration)
 {
     fileName = configuration.ConnectionConfiguration;
     fullPath = Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal),
                             fileName);
 }