/// <summary> /// Upload an asset to Second Life /// </summary> /// <param name="asset">The asset to be uploaded</param> /// <returns>The Asset ID of the completed upload</returns> public LLUUID UploadAsset(Asset asset) { if (curUploadRequest != null) { throw new Exception("An existing asset upload is currently in-progress."); } try { curUploadRequest = new AssetRequestUpload(slClient, LLUUID.Random(), asset); LLUUID assetID = curUploadRequest.DoUpload(); if (asset.Type == Asset.ASSET_TYPE_IMAGE) { SinkFee(SINK_FEE_IMAGE); } return(assetID); } finally { curUploadRequest = null; } }
private void ClearState() { htDownloadRequests.Clear(); curUploadRequest = null; }
/// <summary> /// Upload an asset to Second Life /// </summary> /// <param name="asset">The asset to be uploaded</param> /// <returns>The Asset ID of the completed upload</returns> public LLUUID UploadAsset(Asset asset) { if (curUploadRequest != null) { throw new Exception("An existing asset upload is currently in-progress."); } try { curUploadRequest = new AssetRequestUpload(slClient, LLUUID.Random(), asset); LLUUID assetID = curUploadRequest.DoUpload(); if (asset.Type == Asset.ASSET_TYPE_IMAGE) { SinkFee(SINK_FEE_IMAGE); } return assetID; } finally { curUploadRequest = null; } }
protected void ClearState() { htDownloadRequests.Clear(); curUploadRequest = null; }