Esempio n. 1
0
        public LoggedException(Exception innerException) : base(innerException.Message, innerException)
        {
            string message;

            if (innerException is null)
            {
                innerException = new ArgumentNullException($"{nameof(innerException)} is null @ LoggedException(***Exception***)");
            }

            if (innerException.Message.IsNullOrWhiteSpace())
            {
                message = $"{nameof(innerException.Message)} is null @ LoggedException(***string***, Exception)";
            }
            else
            {
                message = innerException.Message;
            }

            if (Logger == null)
            {
                Logger = OnlineServicesLogger.LoggerConfigurator();
            }

            Logger.Error(innerException, message);
        }
Esempio n. 2
0
 public LoggedException() : base()
 {
     if (Logger == null)
     {
         Logger = OnlineServicesLogger.LoggerConfigurator();
     }
     Logger.Error(this, "Default Call to CTOR @ LoggedException()");
 }
Esempio n. 3
0
        public LoggedException(string message) : base(message)
        {
            //message.IsNullOrWhiteSpace(true);

            if (Logger == null)
            {
                Logger = OnlineServicesLogger.LoggerConfigurator();
            }
            Logger.Error(message);
        }
Esempio n. 4
0
        protected LoggedException(SerializationInfo info, StreamingContext context) : base(info, context)
        {
            if (Logger == null)
            {
                Logger = OnlineServicesLogger.LoggerConfigurator();
            }

            if (info is null)
            {
                Logger.Error($"{nameof(info)} is null @ LoggedException(***SerializationInfo***, StreamingContext)");
            }
            else
            {
                Logger.Error("LoggedException(***SerializationInfo***, StreamingContext)", info);
            }

            Logger.Error("LoggedException(SerializationInfo, ***StreamingContext***)", context);
        }
Esempio n. 5
0
        protected override void BeginProcessing()
        {
            OSService = new OnlineServicesRole(OnlineServicesLogger.LoggerConfigurator(), new AzureCognitiveAgent(OnlineServicesLogger.LoggerConfigurator(), AzCognitiveArgs));

            base.BeginProcessing();
        }