in Assets/Xbox Live/GameSave/Scripts/GameSaveHelper.cs [98:137]
public IEnumerator GetAsBytes(
string containerName,
string[] blobsToRead,
Action<Dictionary<string, byte[]>> resultCallBack)
{
yield return null;
if (resultCallBack != null)
{
var returnDictionary = new Dictionary<string, byte[]>();
#if ENABLE_WINMD_SUPPORT
if (this.gameSaveProvider != null)
{
var loadBuffers = this.LoadDataHelper(containerName, blobsToRead);
if (loadBuffers != null)
{
foreach (var loadedBuffer in loadBuffers)
{
returnDictionary.Add(loadedBuffer.Key, loadedBuffer.Value.ToArray());
}
}
}
else
{
var errorMessage = "An Exception Occured: Game Save Provider hasn't been initialized yet. Initialize needs to be called first.";
ExceptionManager.Instance.ThrowException(
ExceptionSource.GameSaveManager,
ExceptionType.GameSaveProviderNotInitialized,
new Exception(errorMessage));
}
#else
var blobContent = "Fake Content";
var blobContentBytes = Encoding.UTF8.GetBytes(blobContent);
foreach (var blob in blobsToRead)
{
returnDictionary.Add(blob, blobContentBytes);
}
#endif
resultCallBack(returnDictionary);
}
}