Entity.FindComponentOfType Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Overload
FindComponentOfType(ObjectType) |
Prova a trovare un componente del tipo specificato associato a questa entità. |
FindComponentOfType<T>() |
Trovare un componente di un tipo in questa entità. |
FindComponentOfType(ObjectType)
Prova a trovare un componente del tipo specificato associato a questa entità.
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
Parametri
- type
- ObjectType
Tipo di componente da cercare, ad esempio MeshComponent.
Restituisce
Componente se trovato; in caso contrario, null
Commenti
È possibile associare a ogni entità una sola istanza di ogni tipo di componente. Pertanto, questa funzione restituisce un singolo risultato o null
, se non viene trovato alcuno. Se è necessario cercare i componenti nella sottoalbero dell'entità completa, usare la funzione FindComponentsOfTypeInHierarchy(ObjectType, Int32).
Si applica a
FindComponentOfType<T>()
Trovare un componente di un tipo in questa entità.
public:
generic <typename T>
where T : Microsoft::Azure::RemoteRendering::ComponentBase T FindComponentOfType();
public T FindComponentOfType<T> () where T : Microsoft.Azure.RemoteRendering.ComponentBase;
member this.FindComponentOfType : unit -> 'T (requires 'T :> Microsoft.Azure.RemoteRendering.ComponentBase)
Public Function FindComponentOfType(Of T As ComponentBase) () As T
Parametri di tipo
- T
Restituisce
Componente se trovato; in caso contrario, null