Google API Where() 和 When() 命名空间

本文关键字:When 命名空间 API Google Where | 更新日期: 2023-09-27 17:57:15

我想知道要向我的项目添加什么(导入?参考?)以便能够为Google日历使用Where()- 和When()-方法。

法典:

Where eventLocation = new Where();
eventLocation.ValueString = "South Tennis Courts";
entry.Locations.Add(eventLocation);
When eventTime = new When(DateTime.Now, DateTime.Now.AddHours(2));
entry.Times.Add(eventTime);

错误:

Error 1 The type or namespace name 'Where' could not be found (are you missing a using directive or an assembly reference?)
Error 3 The type or namespace name 'When' could not be found (are you missing a using directive or an assembly reference?)  

更新:当前进口:

using Google.GData.Client;
using Google.GData.Calendar;
using Google.GData.Extensions;
using Google.GData.AccessControl;

Google API Where() 和 When() 命名空间

Where类的 Google API 文档页面列出了需要添加为引用的 DLL,以及该程序集中的命名空间:

命名空间:Google.GData.Extensions

Assembly: Google.GData.Extensions (in Google.GData.Extensions.dll)

这在VS2012中对我正确工作,使用来自此页面的最新API下载(2.2.0),日期为2013年6月。 微星硬链接在这里。

如果您查看作为API设置的一部分安装的DLL列表,这不是一个明显的位置(明显的猜测是Google.GData.Calendar.dll)。