Entity.FindComponentOfType 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
FindComponentOfType(ObjectType) |
尝试查找给定类型的组件。 |
FindComponentOfType<COMPTYPE>() |
在此实体上查找类型的组件。 |
FindComponentOfType(ObjectType)
尝试查找给定类型的组件。
public:
Microsoft::Azure::RemoteRendering::ComponentBase ^ FindComponentOfType(Microsoft::Azure::RemoteRendering::ObjectType type);
public Microsoft.Azure.RemoteRendering.ComponentBase FindComponentOfType (Microsoft.Azure.RemoteRendering.ObjectType type);
member this.FindComponentOfType : Microsoft.Azure.RemoteRendering.ObjectType -> Microsoft.Azure.RemoteRendering.ComponentBase
Public Function FindComponentOfType (type As ObjectType) As ComponentBase
参数
- type
- ObjectType
要搜索的组件类型。
返回
如果找到组件,则为 null
注解
每个实体只能附加每个组件类型的一个实例。 因此,如果找不到任何结果,此函数将返回单个结果或 null
。
适用于
FindComponentOfType<COMPTYPE>()
在此实体上查找类型的组件。
public:
generic <typename COMPTYPE>
where COMPTYPE : Microsoft::Azure::RemoteRendering::ComponentBase COMPTYPE FindComponentOfType();
public COMPTYPE FindComponentOfType<COMPTYPE> () where COMPTYPE : Microsoft.Azure.RemoteRendering.ComponentBase;
member this.FindComponentOfType : unit -> 'COMPTYPE (requires 'COMPTYPE :> Microsoft.Azure.RemoteRendering.ComponentBase)
Public Function FindComponentOfType(Of COMPTYPE As ComponentBase) () As COMPTYPE
类型参数
- COMPTYPE
返回
COMPTYPE
如果找到组件,则为 null