示例#1
0
 public static IArea CreateArea(this IAreaService areaService, Enum id)
 {
     if (areaService == null)
     {
         throw new ArgumentNullException(nameof(areaService));
     }
     return(areaService.CreateArea(AreaIdGenerator.Generate(id)));
 }
示例#2
0
        public void AddSynonymsForComponent(Enum areaId, Enum componentId, params string[] synonyms)
        {
            if (synonyms == null)
            {
                throw new ArgumentNullException(nameof(synonyms));
            }

            AddSynonymsForComponent(AreaIdGenerator.Generate(areaId), componentId, synonyms);
        }
示例#3
0
        public void AddSynonymsForArea(Enum areaId, params string[] synonyms)
        {
            if (areaId == null)
            {
                throw new ArgumentNullException(nameof(areaId));
            }
            if (synonyms == null)
            {
                throw new ArgumentNullException(nameof(synonyms));
            }

            AddSynonyms(_areaSynonyms, AreaIdGenerator.Generate(areaId), synonyms);
            _storage.PersistAreaSynonyms(_areaSynonyms);
        }