public void Get <TRestrainedAnimal>(FoundCallback <IReadOnlyList <TRestrainedAnimal> > found, NotFoundCallback notFound) where TRestrainedAnimal : AnimalRestrained, new()
        {
            var animals = this.restrainedAnimalAdapter.Get <TRestrainedAnimal>();

            if (!animals.Any())
            {
                notFound();
                return;
            }

            found(animals);
        }
Esempio n. 2
0
 /// <summary>
 /// Attempts to verify if the asset is known or not. Tries the local storage first, then moves on to the remote storage systems.
 /// </summary>
 /// <param name="assetId">Asset identifier.</param>
 /// <param name="foundCallback">Callback called when it is known if the asset is found or not.</param>
 public void CheckAsset(Guid assetId, FoundCallback foundCallback) => GetAsset(assetId, asset => foundCallback(asset != null), () => foundCallback(false));