linux-packaging-mono/mcs/class/corlib/System.Text/EncodingHelper.WebAssembly.cs
Xamarin Public Jenkins (auto-signing) 64ac736ec5 Imported Upstream version 6.0.0.172
Former-commit-id: f3cc9b82f3e5bd8f0fd3ebc098f789556b44e9cd
2019-04-12 14:10:50 +00:00

34 lines
575 B
C#

#if WASM
using System;
namespace System.Text {
internal static partial class EncodingHelper {
static volatile Encoding utf8Encoding;
internal static Encoding UTF8 {
get {
if (utf8Encoding == null) {
lock (lockobj){
if (utf8Encoding == null){
utf8Encoding = new UTF8Encoding (true, false);
utf8Encoding.setReadOnly ();
}
}
}
return utf8Encoding;
}
}
// The mobile profile has been default'ing to UTF8 since it's creation
internal static Encoding GetDefaultEncoding ()
{
return UTF8;
}
}
}
#endif