Class CultureContext
Allows switching the current thread to a new culture in a using block that will automatically return the culture to its previous state upon completion.
Inheritance
System.Object
CultureContext
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Lucene.Net.Support
Assembly: Lucene.Net.dll
Syntax
public sealed class CultureContext : IDisposable
Constructors
| Improve this Doc View SourceCultureContext(CultureInfo)
Declaration
public CultureContext(CultureInfo culture)
Parameters
Type | Name | Description |
---|---|---|
System.Globalization.CultureInfo | culture |
CultureContext(CultureInfo, CultureInfo)
Declaration
public CultureContext(CultureInfo culture, CultureInfo uiCulture)
Parameters
Type | Name | Description |
---|---|---|
System.Globalization.CultureInfo | culture | |
System.Globalization.CultureInfo | uiCulture |
CultureContext(String)
Declaration
public CultureContext(string cultureName)
Parameters
Type | Name | Description |
---|---|---|
System.String | cultureName |
CultureContext(String, String)
Declaration
public CultureContext(string cultureName, string uiCultureName)
Parameters
Type | Name | Description |
---|---|---|
System.String | cultureName | |
System.String | uiCultureName |
Properties
| Improve this Doc View SourceOriginalCulture
Declaration
public CultureInfo OriginalCulture { get; }
Property Value
Type | Description |
---|---|
System.Globalization.CultureInfo |
OriginalUICulture
Declaration
public CultureInfo OriginalUICulture { get; }
Property Value
Type | Description |
---|---|
System.Globalization.CultureInfo |
Methods
| Improve this Doc View SourceDispose()
Declaration
public void Dispose()
RestoreOriginalCulture()
Declaration
public void RestoreOriginalCulture()
Implements
System.IDisposable