Tag: google directory api

使用谷歌的.Net目录API?

我正在尝试使用Google的.Net目录API创建我的第一个控制台应用程序。 我有一个基于Google示例的代码。 它向我展示了一些错误, 其中一个是我尝试创建服务的时候: var service = new DirectoryService(new BaseClientService.Initializer() { Authenticator = auth, ApplicationName = “Create User”, ApiKey = “” }); 它告诉我:“错误3’Google.Apis.Services.BaseClientService.Initializer’不包含’Authenticator’的定义” 第二个错误在于此function private static IAuthorizationState GetAuthorization(NativeApplicationClient arg){} 它告诉我:“DotNetOpenAuth.OAuth2.UserAgentClient”是在未引用的程序集中定义的。 在这种情况下,我键入(使用nuget控制台):PM>安装包DotNetOpenAuth -Version 4.3.4.13329 ….但它不解决我的问题。 这是我的代码: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Diagnostics; using DotNetOpenAuth.OAuth2; using Google.Apis.Authentication.OAuth2; using Google.Apis.Authentication.OAuth2.DotNetOpenAuth; //using Google.Apis.Samples.Helper; using Google.Apis.Services; […]