示例#1
0
        public static ClassifierSearchSettingsElastic ToClassifierSearchSettingsElastic(this ClassifierSettings classifier, ClassifierSearchSettingsElastic original = null)
        {
            var model = new ClassifierSearchSettingsElastic
            {
                Id    = !string.IsNullOrEmpty(classifier.Id) ? classifier.Id : original?.Id,
                Count = classifier.Count.HasValue ? classifier.Count.Value : (int)original?.Count,
            };

            return(model);
        }
示例#2
0
        public static ClassifierSettings ToClassifierSettingsModel(this ClassifierSearchSettingsElastic classifier)
        {
            var model = new ClassifierSettings
            {
                Id    = classifier.Id,
                Count = classifier.Count
            };

            return(model);
        }