Beispiel #1
0
        public static IConfig Create([JetBrains.Annotations.NotNull] IConfigBehavior behavior)
        {
            if (behavior is null)
            {
                throw new ArgumentNullException(nameof(behavior));
            }

            return(new Config(behavior));
        }
Beispiel #2
0
        public static IPropertyConfig Create([NotNull] this IConfigBehavior behavior)
        {
            if (behavior is null)
            {
                throw new ArgumentNullException(nameof(behavior));
            }

            return(PropertyConfig.Create(behavior));
        }
Beispiel #3
0
        public static ILocalization Create([NotNull] IConfigBehavior behavior)
        {
            if (behavior is null)
            {
                throw new ArgumentNullException(nameof(behavior));
            }

            CurrentLocalization.ThrowIfAlreadyInitialized();
            CurrentLocalization.Current = new InternalLocalization(behavior);
            return(Current);
        }
Beispiel #4
0
 public Config([JetBrains.Annotations.NotNull] IConfigBehavior behavior)
 {
     Behavior = behavior ?? throw new ArgumentNullException(nameof(behavior));
 }
Beispiel #5
0
 public PropertyConfig([NotNull] IConfigBehavior behavior)
     : base(behavior)
 {
 }
Beispiel #6
0
 public InternalLocalization([NotNull] IConfigBehavior config, ILocalizationBehaviour?behaviour = null)
     : base(config)
 {
     (Comparer, Supported) = Convert(behaviour);
 }