Пример #1
0
        /// <summary>
        /// Adds the specified element.
        /// </summary>
        /// <param name="element">The element.</param>
        /// <returns></returns>
        public bool Add(Element element)
        {
            if (element == null)
            {
                return false;
            }

            if (resx.GetElement(element.Name, element.Category, element.Culture) == null)
            {
                resx.AddResource(element);
                return true;
            }
            else
            {
                return false;
            }
        }
Пример #2
0
 public bool Update(Element element)
 {
     element.Culture = FileCulture;
     return this.StoreRepository.Update(element);
 }
Пример #3
0
 public bool Remove(Element element)
 {
     element.Culture = FileCulture;
     return this.StoreRepository.Remove(element);
 }
Пример #4
0
 public bool Add(Element element)
 {
     element.Culture = FileCulture;
     return this.StoreRepository.Add(element);
 }
Пример #5
0
        /// <summary>
        /// Updates the specified element.
        /// </summary>
        /// <param name="element">The element.</param>
        /// <returns></returns>
        public bool Update(Element element)
        {
            if (element == null)
            {
                return false;
            }

            return resx.UpdateResource(element);
        }
Пример #6
0
        /// <summary>
        /// Removes the specified element.
        /// </summary>
        /// <param name="element">The element.</param>
        /// <returns></returns>
        public bool Remove(Element element)
        {
            if (element == null)
            {
                return false;
            }

            return resx.RemoveResource(element);
        }
Пример #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ElementCacheKey" /> class.
 /// </summary>
 /// <param name="element">The element.</param>
 public ElementCacheKey(Element element)
     : this(element.Name, element.Category, element.Culture)
 {
 }