简体   繁体   English

Google Apps 供稿 Google API

[英]Google Apps feed Google API

I am uploading data to Google apps programmatically.我正在以编程方式将数据上传到 Google 应用程序。 I am using the following code我正在使用以下代码

MailItemEntry[] entries = new MailItemEntry[1];
entries[0] = new MailItemEntry();
entries[0].BatchData = new Google.GData.Client.GDataBatchEntryData();
MailItemFeed feed = mailItemService.Batch(domain, UserName, entries);

Is there any way to find out how much data(in MB or GB) has been uploaded to google apps.有什么方法可以查明有多少数据(以 MB 或 GB 为单位)已上传到谷歌应用程序。 Thanks in advance.提前致谢。

What you can do it utilize the BatchAsync of the mailItemService and hook up to the AsyncOperationProgress event.您可以使用BatchAsyncmailItemService并连接到AsyncOperationProgress事件。 This will tell you, as a percent, how much of the data has been sent.这将以百分比的形式告诉您已发送了多少数据。 Just be aware that BatchAsync is a non blocking call, so your application will need to change as a result.请注意, BatchAsync是一个非阻塞调用,因此您的应用程序需要因此而更改。

If you have access to the length of the data that you are sending, you can calculate how much has gone up with each progress changed event.如果您有权访问要发送的数据的长度,则可以计算每个进度更改事件增加了多少。

See Google-docs http://google-gdata.googlecode.com/svn-history/r902/docs/folder4/AllMembers_T_Google_GData_Apps_Migration_MailItemService.htm请参阅 Google 文档http://google-gdata.googlecode.com/svn-history/r902/docs/folder4/AllMembers_T_Google_GData_Apps_Migration_MailItemService.htm

MSDN http://msdn.microsoft.com/en-us/library/system.componentmodel.progresschangedeventargs.aspx MSDN http://msdn.microsoft.com/en-us/library/system.componentmodel.progresschangedeventargs.aspx

Hope that helps希望有帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM