private string GetTextResource(string espaceName, string resourceName, bool enableWarnings) { var resourceBinary = RuntimePlatformUtils.TryGetResourceBinary(resourceName, espaceName); if (resourceBinary != null && resourceBinary.Length > 0) { return(Encoding.UTF8.GetStringWithoutBOM(resourceBinary)); } if (enableWarnings) { OSTrace.Warning("Could not get " + resourceName + " file for '{0}'.", espaceName); } return(null); }