コード例 #1
0
        public TermOptions MergeWith(IPropertySettings settingsAttribute)
        {
            settingsAttribute.CheckNotNull(nameof(settingsAttribute));

            if (settingsAttribute.Properties.Contains(nameof(Case)))
            {
                Case = (TermCase)settingsAttribute.Properties[nameof(Case)];
            }

            if (settingsAttribute.Properties.Contains(nameof(Match)))
            {
                Match = (TermMatch)settingsAttribute.Properties[nameof(Match)];
            }

            if (settingsAttribute.Properties.Contains(nameof(Format)))
            {
                Format = (string)settingsAttribute.Properties[nameof(Format)];
            }

            if (settingsAttribute.Properties.Contains(nameof(Culture)))
            {
                Culture = (CultureInfo)settingsAttribute.Properties[nameof(Culture)];
            }

            return(this);
        }
コード例 #2
0
        public void MergeWith(IPropertySettings settingsAttribute)
        {
            settingsAttribute.CheckNotNull(nameof(settingsAttribute));

            if (settingsAttribute.Properties.Contains(nameof(Case)))
            {
                Case = (TermCase)settingsAttribute.Properties[nameof(Case)];
            }

            if (settingsAttribute.Properties.Contains(nameof(Match)))
            {
                Match = (TermMatch)settingsAttribute.Properties[nameof(Match)];
            }

            if (settingsAttribute.Properties.Contains(nameof(Format)))
            {
                Format = (string)settingsAttribute.Properties[nameof(Format)];
            }
        }