Why is type of these User properties object: Addresses, Emails, Organizations, etc?

六眼飞鱼酱① 提交于 2019-12-06 14:58:35

问题


I am referring to the Google.Apis.Admin.Directory.directory_v1.Data.User type.

The property type of Addresses, for example, in beta versions (i.e. 1.7 and older) was

public virtual System.Collections.Generic.IList<UserAddress> Addresses { get; set; }

In later versions (currently 1.9.1), they are all of type object.

public virtual object Addresses { get; set; }

What are the reasons behind the change and usage scenarios?

I trawled the release notes, the web, google group, SO, etc. and found no explanation on this.


回答1:


A change to the backend had the unintended consequence of changing the discovery document for the service, making the addresses field (and others) being marked as type=any. This causes problems for strongly types languages like .NET, as you've found. The team is aware of the issue but it's unclear when a fix will be available.



来源:https://stackoverflow.com/questions/29620274/why-is-type-of-these-user-properties-object-addresses-emails-organizations-e

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!