/// <summary>
 /// Initialze a TitleStorageQuota from the corresponding C object
 /// </summary>
 internal TitleStorageQuota(XSAPI_TITLE_STORAGE_QUOTA quotaStruct)
 {
     QuotaBytes             = quotaStruct.QuotaBytes;
     UsedBytes              = quotaStruct.UsedBytes;
     StorageType            = quotaStruct.storageType;
     XboxUserId             = MarshalingHelpers.Utf8ToString(quotaStruct.XboxUserId);
     ServiceConfigurationId = MarshalingHelpers.Utf8ToString(quotaStruct.ServiceConfigurationId);
 }
예제 #2
0
        private void GetQuotaComplete(XSAPI_RESULT_INFO result, XSAPI_TITLE_STORAGE_QUOTA quota, IntPtr contextKey)
        {
            XsapiCallbackContext <object, TitleStorageQuota> context;

            if (XsapiCallbackContext <object, TitleStorageQuota> .TryRemove(contextKey.ToInt32(), out context))
            {
                if (result.errorCode == XSAPI_RESULT.XSAPI_RESULT_OK)
                {
                    context.TaskCompletionSource.SetResult(new TitleStorageQuota(quota));
                }
                else
                {
                    context.TaskCompletionSource.SetException(new XboxException(result));
                }

                context.Dispose();
            }
        }
예제 #3
0
 /// <summary>
 /// Initialze a TitleStorageQuota from the corresponding C object
 /// </summary>
 internal TitleStorageQuota(XSAPI_TITLE_STORAGE_QUOTA quotaStruct)
 {
     QuotaBytes  = quotaStruct.QuotaBytes;
     UsedBytes   = quotaStruct.UsedBytes;
     StorageType = quotaStruct.storageType;
 }