public string ShowMapExistence(string mapCode)
        {
            string mapFile = mapCode + ".kml";

            if (fileSystem.FileExists(mapFile))
            {
                return($"Kml file for Map {mapCode} exists");
            }
            else
            {
                return($"NOT found for Map {mapCode}");
            }
        }
Exemplo n.º 2
0
        public string ShowMapExistence(string mapCode)
        {
            string mapFile = mapCode + ".kml";

            // a call to the factory method could be done here. The difference is that new instances will created for each call.
            if (fileSystem.FileExists(mapFile))
            {
                return(string.Format("Kml file for Map {0} exists", mapCode));
            }
            else
            {
                return(string.Format("NOT found for Map {0}", mapCode));
            }
        }
Exemplo n.º 3
0
        public string ShowMapExistence(string mapCode)
        {
            string mapFile = mapCode + ".kml";

            IFileSystemGateway fileSystem = FileSystemGatewayFactory.Create(); // a new instance is created at each method call

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