sources/src/Monetco.Host/Controllers/SimulatorController.cs
//TODO: Move to manage controller
/// <summary>
/// Get latest version and build date
/// </summary>
/// <response code="200">Success</response>
Get latest version and build date
Get latest version and build date
[HttpGet("version")]
        public IActionResult GetVersion()
        {
            var result = new ContentResult();
            var res = typeof(Monetco.Host.Program).GetTypeInfo()
                .Assembly.GetName().Version.ToString();
            Assembly assembly = typeof(Monetco.Host.Program).GetTypeInfo().Assembly;
            System.IO.FileInfo fileInfo = new System.IO.FileInfo(assembly.Location);
            DateTime lastModified = fileInfo.LastWriteTime;
            var ip = HttpContext.Connection.LocalIpAddress;
            result.Content = "version " + res + ", by " + lastModified + "; IP - " + ip;
            return result;
        }
[ HttpGet ( " " ) ] public IActionResult GetVersion ( ) { var result = new ContentResult ( ) ; var res = typeof ( Monetco . Host . Program ) . GetTypeInfo ( ) . Assembly . GetName ( ) . Version . ToString ( ) ; Assembly assembly = typeof ( Monetco . Host . Program ) . GetTypeInfo ( ) . Assembly ; System . IO . FileInfo fileInfo = new System . IO . FileInfo ( assembly . Location ) ; DateTime lastModified = fileInfo . LastWriteTime ; var ip = HttpContext . Connection . LocalIpAddress ; result . Content = " " + res + " " + lastModified + " " + ip ; return result ; }
Get latest version and build date
Get latest version and build date
response
None