Ejemplo n.º 1
0
        /// <summary>
        /// the method will add to ignored files the items meant to be ignored
        /// </summary>
        /// <typeparam name="T">template</typeparam>
        /// <param name="itemsToIgnore">list of items to ignore</param>
        /// <param name="settings">settings from SettingsProvider</param>
        /// <param name="PropertyName">name of property meant to be get and set using reflection</param>
        public void AddItemsToIgnore <T>(List <string> itemsToIgnore, T settings, string PropertyName)
        {
            if (itemsToIgnore.Any() == false)
            {
                return;
            }

            string filesToIgnore = (string)PropertyHandler.Get <T>(settings, PropertyName);

            if (filesToIgnore.Length > 0)
            {
                filesToIgnore += ";";
            }

            filesToIgnore += string.Join(";", RemoveDuplicateDocuments(itemsToIgnore, filesToIgnore));
            PropertyHandler.Set(settings, PropertyName, filesToIgnore);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 获取集合中的当前元素的Value
 /// </summary>
 /// <returns> </returns>
 public object GetValue() => _currentProperty.Get(_entity);