Пример #1
0
        /// <inheritdoc/>
        public CatalogueExtractabilityStatus GetExtractabilityStatus(IDataExportRepository dataExportRepository)
        {
            if (_extractabilityStatus != null)
            {
                return(_extractabilityStatus);
            }

            if (dataExportRepository == null)
            {
                return(null);
            }

            _extractabilityStatus = dataExportRepository.GetExtractabilityStatus(this);
            return(_extractabilityStatus);
        }
Пример #2
0
 /// <summary>
 /// Cleares the cached answer of <see cref="GetExtractabilityStatus"/>
 /// </summary>
 public void ClearAllInjections()
 {
     _extractabilityStatus = null;
     _knownCatalogueItems  = new Lazy <CatalogueItem[]>(() => Repository.GetAllObjectsWithParent <CatalogueItem, Catalogue>(this));
 }
Пример #3
0
 /// <summary>
 /// Records the known extractability status (as a cached answer for <see cref="GetExtractabilityStatus"/>)
 /// </summary>
 /// <param name="instance"></param>
 public void InjectKnown(CatalogueExtractabilityStatus instance)
 {
     _extractabilityStatus = instance;
 }