DataServiceConfiguration.RegisterKnownType(Type) 方法
定义
向可由数据服务识别的类型列表中添加类型。Adds a type to the list of types that are recognized by the data service.
public:
virtual void RegisterKnownType(Type ^ type);
public void RegisterKnownType (Type type);
abstract member RegisterKnownType : Type -> unit
override this.RegisterKnownType : Type -> unit
Public Sub RegisterKnownType (type As Type)
参数
- type
- Type
要添加到已知类型的集合中的类型。Type to add to the collection of known types.
实现
注解
当某一类型无法由运行时使用默认规则集进行检测时,提供程序可以使用 RegisterKnownType 方法来注册该类型。A provider can use the RegisterKnownType method to register a type when it cannot be detected by the runtime by using the default set of rules.