Exemplo n.º 1
0
        public async Task <LogApplication> GetLogApplicationAsync(string applicationId, string displayName)
        {
            var logApplication = await _logReader.GetLogApplicationAsync(applicationId);

            if (logApplication == default)
            {
                return(await _logWriter.CreateLogApplicationAsync(applicationId, displayName));
            }

            if (logApplication.DisplayName != displayName)
            {
                logApplication.DisplayName = displayName;

                await _logWriter.UpdateLogApplicationAsync(logApplication);
            }

            return(logApplication);
        }