Google Apps Feed Google API
我正在以编程方式将数据上传到 Google 应用程序。我正在使用以下代码
MailItemEntry[] entries = new MailItemEntry[1];
entries[0] = new MailItemEntry();
entries[0].BatchData = new Google.GData.Client.GDataBatchEntryData();
MailItemFeed feed = mailItemService.Batch(domain, UserName, entries);
有没有办法找出有多少数据(以 MB 或 GB 为单位)已上传到谷歌应用程序。 提前致谢。
I am uploading data to Google apps programmatically. 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.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以利用
mailItemService
的BatchAsync
并连接到AsyncOperationProgress
事件。这会以百分比形式告诉您已发送的数据量。请注意,BatchAsync 是非阻塞调用,因此您的应用程序将需要进行更改。如果您有权访问正在发送的数据的长度,则可以计算每个进度更改事件增加了多少。
请参阅 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
希望有帮助
What you can do it utilize the
BatchAsync
of themailItemService
and hook up to theAsyncOperationProgress
event. This will tell you, as a percent, how much of the data has been sent. Just be aware thatBatchAsync
is a non blocking call, so your application will need to change as a result.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
MSDN
http://msdn.microsoft.com/en-us/library/system.componentmodel.progresschangedeventargs.aspx
Hope that helps