/// <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); }
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(); } }
/// <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; }