HostingEnvironment.SetCultures Método

Definição

Define informações de cultura para o thread atual.Sets culture information for the current thread.

Sobrecargas

SetCultures()

Define o thread atual para a cultura especificada no arquivo de configuração de aplicativo.Sets the current thread to the culture specified in the application configuration file.

SetCultures(String)

Define o thread atual para a cultura do caminho virtual especificado.Sets the current thread to the culture of the specified virtual path.

SetCultures()

Define o thread atual para a cultura especificada no arquivo de configuração de aplicativo.Sets the current thread to the culture specified in the application configuration file.

public:
 static IDisposable ^ SetCultures();
public static IDisposable SetCultures ();
static member SetCultures : unit -> IDisposable
Public Shared Function SetCultures () As IDisposable

Retornos

IDisposable

Um objeto IDisposable que representa a cultura antes da alteração; esse objeto pode ser usado para reverter para a cultura anterior.An IDisposable object that represents the culture prior to changing; this object can be used to revert to the previous culture.

Comentários

O SetCultures método define o thread atual para a cultura especificada no elemento do elemento Globalization (esquema de configurações ASP.net) no arquivo de configuração do aplicativo.The SetCultures method sets the current thread to the culture specified in the globalization Element (ASP.NET Settings Schema) element in the application's configuration file.

Aplica-se a

SetCultures(String)

Define o thread atual para a cultura do caminho virtual especificado.Sets the current thread to the culture of the specified virtual path.

public:
 static IDisposable ^ SetCultures(System::String ^ virtualPath);
public static IDisposable SetCultures (string virtualPath);
static member SetCultures : string -> IDisposable
Public Shared Function SetCultures (virtualPath As String) As IDisposable

Parâmetros

virtualPath
String

O caminho que contém as informações de cultura.The path that contains the culture information.

Retornos

IDisposable

Um objeto IDisposable que representa a cultura antes da alteração; esse objeto pode ser usado para reverter para a cultura anterior.An IDisposable object that represents the culture prior to changing; this object can be used to revert to the previous culture.

Comentários

O SetCultures método define o thread atual para a cultura que resulta após a aplicação de todos os elementos nos arquivos de configuração que afetam o caminho virtual especificado.The SetCultures method sets the current thread to the culture that results after applying all elements in the configuration files affecting the specified virtual path.

Aplica-se a