/// <summary> /// Handles an incoming request for an asset from the remote server. /// </summary> /// <returns>The asset or null if not found.</returns> /// <param name="assetID">Asset identifier.</param> public StratusAsset RequestAssetSync(Guid assetID) { Asset whipAsset = null; try { whipAsset = _provider.GetAsset(assetID.ToString()); } catch (AssetServerError e) { LOG.Log(Logging.LogLevel.Error, () => $"[{_serverHandle}] Error getting asset from server.", e); return(null); } catch (AuthException e) { LOG.Log(Logging.LogLevel.Error, () => $"[{_serverHandle}] Authentication error getting asset from server.", e); return(null); } return(StratusAsset.FromWHIPAsset(whipAsset)); }
public static void TestStratusAsset_FromWHIPAsset_Correct() { Assert.AreEqual(STRATUS_ASSET, StratusAsset.FromWHIPAsset(WHIP_ASSET)); }