public void AddGlobalAsset(object value, CustomAsset asset, CancellationToken cancellationToken) { cancellationToken.ThrowIfCancellationRequested(); if (!_globalAssets.TryAdd(value, asset)) { // there is existing one, make sure asset is same Contract.ThrowIfFalse(_globalAssets[value].Checksum == asset.Checksum); } }
/// <summary> /// Add asset that is not part of solution to be part of this snapshot. /// /// TODO: currently, this asset must be something <see cref="Serializer"/> can understand /// this should be changed so that custom serializer can be discoverable by <see cref="RemotableData.Kind"/> /// </summary> public void AddAdditionalAsset(CustomAsset asset, CancellationToken cancellationToken) { _storage.AddAdditionalAsset(asset, cancellationToken); }
public void AddGlobalAsset(object value, CustomAsset asset, CancellationToken cancellationToken) { _assetStorages.AddGlobalAsset(value, asset, cancellationToken); }
public void AddAdditionalAsset(CustomAsset asset) { LazyInitialization.EnsureInitialized(ref _lazyAdditionalAssets, s_additionalAssetsCreator).TryAdd(asset.Checksum, asset); }
public void AddAdditionalAsset(CustomAsset asset) { _storage.AddAdditionalAsset(asset); }