[英]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.您可以使用
BatchAsync
的mailItemService
并连接到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.