/// <summary>
        /// Gets a <see cref="WatchedAsset{T}"/> which watches the specified asset.
        /// </summary>
        private WatchedAsset <TOutput> GetSharedWatchedAssetInternal <TOutput>(String asset, ScreenDensityBucket density)
        {
            lock (ContentManager.AssetCache.SyncObject)
            {
                if (CreateFileSystemWatchers())
                {
                    if (sharedWatchedAssets == null)
                    {
                        sharedWatchedAssets = new Dictionary <String, Dictionary <Byte, Object> >();
                    }

                    if (!sharedWatchedAssets.TryGetValue(asset, out var watchersForAsset))
                    {
                        watchersForAsset           = new Dictionary <Byte, Object>();
                        sharedWatchedAssets[asset] = watchersForAsset;
                    }

                    if (!watchersForAsset.TryGetValue((Byte)density, out var watcherForDensity))
                    {
                        watcherForDensity = new WatchedAsset <TOutput>(ContentManager, asset, density);
                        watchersForAsset[(Byte)density] = watcherForDensity;
                    }

                    return((WatchedAsset <TOutput>)watcherForDensity);
                }
            }

            return(null);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="WatchableAssetReference{T}"/> structure.
 /// </summary>
 /// <param name="asset">The watched asset which this reference represents.</param>
 public WatchableAssetReference(WatchedAsset <T> asset) => this.reference = asset;