コード例 #1
0
 /// <inheritdoc />
 public IModule GetModule(ModuleIdentity moduleIdentity)
 {
     if (!IsModuleRegistered(moduleIdentity))
     {
         return(null);
     }
     return(ModuleDtoFileSystem.ReadFromDirectory(Path.Combine(BasePath, moduleIdentity.ToString())).Unwrap().Result);
 }
コード例 #2
0
 /// <inheritdoc />
 public void RemoveModule(ModuleIdentity moduleIdentity)
 {
     if (!IsModuleRegistered(moduleIdentity))
     {
         throw new ArgumentException($"Module {moduleIdentity} wasn't registered");
     }
     Directory.Delete(Path.Combine(BasePath, moduleIdentity.ToString()), true);
 }
コード例 #3
0
 private bool IsModuleRegistered(ModuleIdentity moduleIdentity)
 {
     return(Directory.Exists(Path.Combine(BasePath, moduleIdentity.ToString())));
 }