IdentityReferenceCollection.Translate Método
Definição
Converte os objetos na coleção IdentityReferenceCollection para o tipo especificado.Converts the objects in the IdentityReferenceCollection collection to the specified type.
Sobrecargas
| Translate(Type) |
Converte os objetos na coleção para o tipo especificado.Converts the objects in the collection to the specified type. Chamar esse método é o mesmo que chamar Translate(Type, Boolean) com o segundo parâmetro definido como |
| Translate(Type, Boolean) |
Converte os objetos na coleção para o tipo especificado e usa a tolerância a falhas especificada para tratar ou ignorar os erros associados a um tipo não ter um mapeamento de conversão.Converts the objects in the collection to the specified type and uses the specified fault tolerance to handle or ignore errors associated with a type not having a conversion mapping. |
Translate(Type)
Converte os objetos na coleção para o tipo especificado.Converts the objects in the collection to the specified type. Chamar esse método é o mesmo que chamar Translate(Type, Boolean) com o segundo parâmetro definido como false, o que significa que as exceções não serão geradas para itens cuja conversão falhar.Calling this method is the same as calling Translate(Type, Boolean) with the second parameter set to false, which means that exceptions will not be thrown for items that fail conversion.
public:
System::Security::Principal::IdentityReferenceCollection ^ Translate(Type ^ targetType);
public System.Security.Principal.IdentityReferenceCollection Translate (Type targetType);
member this.Translate : Type -> System.Security.Principal.IdentityReferenceCollection
Public Function Translate (targetType As Type) As IdentityReferenceCollection
Parâmetros
- targetType
- Type
O tipo para o qual os itens da coleção estão sendo convertidos.The type to which items in the collection are being converted.
Retornos
Uma coleção IdentityReferenceCollection que representa o conteúdo convertido da coleção original.A IdentityReferenceCollection collection that represents the converted contents of the original collection.
Comentários
A ordem é preservada na coleção retornada, ou seja, o primeiro item na coleção retornada corresponde ao primeiro item na coleção de origem e assim por diante, para cada item na coleção.Order is preserved in the returned collection, That is, the first item in the returned collection corresponds to the first item in the source collection, and so on, for each item in the collection.
Não é necessário que os itens na coleção de origem sejam do mesmo tipo.The items in the source collection are not required to be of the same type.
Aplica-se a
Translate(Type, Boolean)
Converte os objetos na coleção para o tipo especificado e usa a tolerância a falhas especificada para tratar ou ignorar os erros associados a um tipo não ter um mapeamento de conversão.Converts the objects in the collection to the specified type and uses the specified fault tolerance to handle or ignore errors associated with a type not having a conversion mapping.
public:
System::Security::Principal::IdentityReferenceCollection ^ Translate(Type ^ targetType, bool forceSuccess);
public System.Security.Principal.IdentityReferenceCollection Translate (Type targetType, bool forceSuccess);
member this.Translate : Type * bool -> System.Security.Principal.IdentityReferenceCollection
Public Function Translate (targetType As Type, forceSuccess As Boolean) As IdentityReferenceCollection
Parâmetros
- targetType
- Type
O tipo para o qual os itens da coleção estão sendo convertidos.The type to which items in the collection are being converted.
- forceSuccess
- Boolean
Um valor booliano que determina como os erros de conversão são tratados.A Boolean value that determines how conversion errors are handled.
Se forceSuccess é true, erros de conversão devido a um mapeamento não ser localizado para a translação resultam em uma falha de conversão e na geração de exceções.If forceSuccess is true, conversion errors due to a mapping not being found for the translation result in a failed conversion and exceptions being thrown.
Se forceSuccess é false, tipos cuja conversão falhou devido a um mapeamento não ter sido localizado para a translação são copiados sem serem convertidos na coleção que está sendo retornada.If forceSuccess is false, types that failed to convert due to a mapping not being found for the translation are copied without being converted into the collection being returned.
Retornos
Uma coleção IdentityReferenceCollection que representa o conteúdo convertido da coleção original.A IdentityReferenceCollection collection that represents the converted contents of the original collection.
Comentários
A ordem é preservada na coleção retornada, ou seja, o primeiro item na coleção retornada corresponde ao primeiro item na coleção de origem e assim por diante, para cada item na coleção.Order is preserved in the returned collection, That is, the first item in the returned collection corresponds to the first item in the source collection, and so on, for each item in the collection.
Não é necessário que os itens na coleção de origem sejam do mesmo tipo.The items in the source collection are not required to be of the same type.