我有一个访问 Google 电子表格以创建电话簿的 Windows 应用程序。当我尝试打开电话簿时,我被标记为System.NotImplementedException: The method or operation is not implemented.
我不太确定为什么,因为它似乎正在实施?
这是第一个被标记为问题的地方:
internal object FromCertificate(X509Certificate2 certificate)
{
throw new NotImplementedException(); //Error flags this line
}
这是第二个。据我所知,这部分没有问题,但它仍然在标记异常。
ServiceAccountCredential credential = new ServiceAccountCredential(
new ServiceAccountCredential.Initializer(serviceAccountEmail)
{
Scopes = new[] { "https://www.googleapis.com/auth/spreadsheets", "https://docs.google.com/feeds" }
}.FromCertificate(certificate));
任何建议将不胜感激。我在 Visual Studio 2015 中使用 C#。