/// <summary>
        /// Initializes a new instance of the <see cref="ResourceTableEntry" /> class.
        /// </summary>
        /// <param name="container">The owner.</param>
        /// <param name="key">The resource key.</param>
        /// <param name="index">The original index of the resource in the file.</param>
        /// <param name="languages">The localized values.</param>
        internal ResourceTableEntry(ResourceEntity container, string key, double index, IDictionary <CultureKey, ResourceLanguage> languages)
        {
            Container  = container;
            _storedKey = key;

            Key.SetBackingField(key);
            Index.SetBackingField(index);

            _languages = languages;

            Values = new ResourceTableValues <string?>(_languages, lang => lang.GetValue(Key) !, (lang, value) => lang.SetValue(Key, value));
            Values.ValueChanged += Values_ValueChanged;

            Comments = new ResourceTableValues <string?>(_languages, lang => lang.GetComment(Key) !, (lang, value) => lang.SetComment(Key, value));
            Comments.ValueChanged += Comments_ValueChanged;

            FileExists = new ResourceTableValues <bool>(_languages, lang => true, (lang, value) => false);

            SnapshotValues   = new ResourceTableValues <string?>(_languages, lang => Snapshot?.GetValueOrDefault(lang.CultureKey)?.Text !, (lang, value) => false);
            SnapshotComments = new ResourceTableValues <string?>(_languages, lang => Snapshot?.GetValueOrDefault(lang.CultureKey)?.Comment !, (lang, value) => false);

            ValueAnnotations   = new ResourceTableValues <ICollection <string> >(_languages, GetValueAnnotations, (lang, value) => false);
            CommentAnnotations = new ResourceTableValues <ICollection <string> >(_languages, GetCommentAnnotations, (lang, value) => false);

            IsItemInvariant = new ResourceTableValues <bool>(_languages, lang => GetIsInvariant(lang.CultureKey), (lang, value) => SetIsInvariant(lang.CultureKey, value));

            IsRuleEnabled = new DelegateIndexer <string, bool>(GetIsRuleEnabled, SetIsRuleEnabled);
        }
        private void ResetTableValues()
        {
            Values.ValueChanged -= Values_ValueChanged;
            Values = new ResourceTableValues <string?>(_languages, lang => lang.GetValue(Key) !, (lang, value) => lang.SetValue(Key, value));
            Values.ValueChanged += Values_ValueChanged;

            Comments.ValueChanged -= Comments_ValueChanged;
            Comments = new ResourceTableValues <string?>(_languages, lang => lang.GetComment(Key) !, (lang, value) => lang.SetComment(Key, value));
            Comments.ValueChanged += Comments_ValueChanged;

            FileExists = new ResourceTableValues <bool>(_languages, lang => true, (lang, value) => false);

            SnapshotValues   = new ResourceTableValues <string?>(_languages, lang => Snapshot?.GetValueOrDefault(lang.CultureKey)?.Text !, (lang, value) => false);
            SnapshotComments = new ResourceTableValues <string?>(_languages, lang => Snapshot?.GetValueOrDefault(lang.CultureKey)?.Comment !, (lang, value) => false);

            ValueAnnotations   = new ResourceTableValues <ICollection <string> >(_languages, GetValueAnnotations, (lang, value) => false);
            CommentAnnotations = new ResourceTableValues <ICollection <string> >(_languages, GetCommentAnnotations, (lang, value) => false);

            IsItemInvariant = new ResourceTableValues <bool>(_languages, lang => GetIsInvariant(lang.CultureKey), (lang, value) => SetIsInvariant(lang.CultureKey, value));
        }