| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using GreenTree.Nachtragsmanagement.Core.Configuration;
- using GreenTree.Nachtragsmanagement.Core.Domain.Config;
- namespace GreenTree.Nachtragsmanagement.Services.Configuration
- {
- public interface IConfigurationService
- {
- /// <summary>
- /// Reads the current configuration from the global config
- /// </summary>
- AppendixConfigurationSection GetCurrentConfiguration();
- #region ConfigItem
- /// <summary>
- /// Gets all configItems
- /// </summary>
- IList<ConfigItem> GetAllConfigItems();
- /// <summary>
- /// Gets a configItem by specified Id
- /// </summary>
- /// <param name="id">ConfigItem identifier.</param>
- ConfigItem GetConfigItemById(int id);
- /// <summary>
- /// Gets a configItem by specified name
- /// </summary>
- /// <param name="name">ConfigItem name.</param>
- ConfigItem GetConfigItemByName(string name);
- /// <summary>
- /// Gets all configItems to the specified ids
- /// </summary>
- IList<ConfigItem> GetConfigItemsByIds(int[] ids);
- /// <summary>
- /// Insert a configItem
- /// </summary>
- /// <param name="configItem">ConfigItem.</param>
- void InsertConfigItem(ConfigItem configItem);
- /// <summary>
- /// Update a configItem
- /// </summary>
- /// <param name="configItem">ConfigItem.</param>
- void UpdateConfigItem(ConfigItem configItem);
- /// <summary>
- /// Delete a configItem
- /// </summary>
- /// <param name="configItem">ConfigItem.</param>
- void DeleteConfigItem(ConfigItem configItem);
- #endregion
- #region Casting
- /// <summary>
- /// Trys to convert the config items value type and returns its actual value, otherwise NULL
- /// </summary>
- /// <typeparam name="T">The actual type.</typeparam>
- /// <param name="configItem">ConfigItem.</param>
- /// <param name="success">Determines if the conversion was possible.</param>
- T TryGetConfigItemValue<T>(ConfigItem configItem, out bool success);
- #endregion
- }
- }
|