예제 #1
0
 public static void Initialization(object context, object referenceObj)
 {
     if (referenceObj != null)
     {
         throw XInitializeException.Reinitialize(context);
     }
 }
예제 #2
0
        public static void Reinitialize([Localizable(false)] string message)
        {
            var exception = XInitializeException.Reinitialize(message);

            Debug.Assert(true, exception.Message);

            throw exception;
        }
예제 #3
0
        public static void Reinitialize(object obj)
        {
            if (obj == null)
            {
                return;
            }

            var exception = XInitializeException.Reinitialize(obj);

            Debug.Assert(true, exception.Message);

            throw exception;
        }
예제 #4
0
        internal void Initialize(string name, ILoggerFactory loggerFactory, IConfigurationSection settingSection)
        {
            if (IsInitialized)
            {
                XInitializeException.Reinitialize(this);
            }

            IsInitialized = true;

            Name   = name;
            Logger = loggerFactory.CreateLogger($"#{Name}");

            if (settingSection != null)
            {
                InternalInitializeFromSettingsSection(settingSection);
            }
        }