public RemotePathMapping Add(RemotePathMapping mapping) { mapping.LocalPath = new OsPath(mapping.LocalPath).AsDirectory().FullPath; mapping.RemotePath = new OsPath(mapping.RemotePath).AsDirectory().FullPath; var all = All(); ValidateMapping(all, mapping); var result = _remotePathMappingRepository.Insert(mapping); _cache.Clear(); return(result); }
public RemotePathMapping Add(RemotePathMapping mapping) { mapping.LocalPath = CleanPath(mapping.LocalPath); mapping.RemotePath = CleanPath(mapping.RemotePath); var all = All(); ValidateMapping(all, mapping); var result = _remotePathMappingRepository.Insert(mapping); _cache.Clear(); return(result); }