"景先生毕设|www.jxszl.com

C# CalendarService类代码示例

2023-12-29 17:37编辑: www.jxszl.com景先生毕设
本文整理汇总了C#中CalendarService类的典型用法代码示例。如果您正苦于以下问题:C#CalendarService类的具体用法?C#CalendarService怎么用?C#CalendarService使用的例子?这里精选的类代码示例或许可以为您提供帮助。 示例1:CreateService publicCalendarServiceCreateService(stringapplicationName) { UserCredentialcredential; string[]scopes={CalendarService.Scope.CalendarReadonly}; using(varstream=newFileStream("client_secret.json",FileMode.Open,FileAccess.Read)) { varcredPath=Environment.GetFolderPath(Environment.SpecialFolder.Personal); credPath=Path.Combine(credPath,".credentials"); credential=GoogleWebAuthorizationBroker.AuthorizeAsync( GoogleClientSecrets.Load(stream).Secrets, scopes, "user", CancellationToken.None, newFileDataStore(credPath,true)).Result; } varservice=newCalendarService(newBaseClientService.Initializer() { HttpClientInitializer=credential, ApplicationName=applicationName, }); returnservice; }
原文链接:http://www.jxszl.com/biancheng/C/556643.html