Ejemplo n.º 1
0
        /// <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));
        }
Ejemplo n.º 2
0
 public static void TestStratusAsset_FromWHIPAsset_Correct()
 {
     Assert.AreEqual(STRATUS_ASSET, StratusAsset.FromWHIPAsset(WHIP_ASSET));
 }