Ejemplo n.º 1
0
        public string ShowMapExistence(string mapCode)
        {
            string mapFile = mapCode + ".kml";

            IFileSystemGateway fileSystemGateway = new FileSystemGateway(); // instance creation still keeps a dependency to the external dependency

            if (fileSystemGateway.FileExists(mapFile))
            {
                return($"Kml file for Map {mapCode} exists");
            }
            else
            {
                return($"NOT found for Map {mapCode}");
            }
        }
        public string ShowMapExistence(string mapCode)
        {
            string mapFile = mapCode + ".kml";

            IFileSystemGateway fileSystemGateway = new FileSystemGateway();

            if (fileSystemGateway.FileExists(mapFile))
            {
                return($"Kml file for Map {mapCode} exists");
            }
            else
            {
                return($"NOT found for Map {mapCode}");
            }
        }