summaryrefslogtreecommitdiff
path: root/src/mscorlib/src/System/Resources/ResourceSet.cs
diff options
context:
space:
mode:
authorJiyoung Yun <jy910.yun@samsung.com>2016-12-27 16:46:08 +0900
committerJiyoung Yun <jy910.yun@samsung.com>2016-12-27 16:46:08 +0900
commitdb20f3f1bb8595633a7e16c8900fd401a453a6b5 (patch)
treee5435159cd1bf0519276363a6fe1663d1721bed3 /src/mscorlib/src/System/Resources/ResourceSet.cs
parent4b4aad7217d3292650e77eec2cf4c198ea9c3b4b (diff)
downloadcoreclr-db20f3f1bb8595633a7e16c8900fd401a453a6b5.tar.gz
coreclr-db20f3f1bb8595633a7e16c8900fd401a453a6b5.tar.bz2
coreclr-db20f3f1bb8595633a7e16c8900fd401a453a6b5.zip
Imported Upstream version 1.0.0.9127upstream/1.0.0.9127
Diffstat (limited to 'src/mscorlib/src/System/Resources/ResourceSet.cs')
-rw-r--r--src/mscorlib/src/System/Resources/ResourceSet.cs21
1 files changed, 5 insertions, 16 deletions
diff --git a/src/mscorlib/src/System/Resources/ResourceSet.cs b/src/mscorlib/src/System/Resources/ResourceSet.cs
index ed40a1237f..1b272fc6ff 100644
--- a/src/mscorlib/src/System/Resources/ResourceSet.cs
+++ b/src/mscorlib/src/System/Resources/ResourceSet.cs
@@ -31,15 +31,11 @@ namespace System.Resources {
// stores them in a hash table. Custom IResourceReaders can be used.
//
[Serializable]
-[System.Runtime.InteropServices.ComVisible(true)]
+ [System.Runtime.InteropServices.ComVisible(true)]
public class ResourceSet : IDisposable, IEnumerable
{
[NonSerialized] protected IResourceReader Reader;
-#if FEATURE_CORECLR
internal Hashtable Table;
-#else
- protected Hashtable Table;
-#endif
private Hashtable _caseInsensitiveTable; // For case-insensitive lookups.
@@ -65,9 +61,6 @@ namespace System.Resources {
// implementation. Use this constructor to open & read from a file
// on disk.
//
- #if FEATURE_CORECLR
- [System.Security.SecurityCritical] // auto-generated
- #endif
public ResourceSet(String fileName)
{
Reader = new ResourceReader(fileName);
@@ -89,7 +82,6 @@ namespace System.Resources {
// implementation. Use this constructor to read from an open stream
// of data.
//
- [System.Security.SecurityCritical] // auto-generated_required
public ResourceSet(Stream stream)
{
Reader = new ResourceReader(stream);
@@ -98,7 +90,6 @@ namespace System.Resources {
}
#if LOOSELY_LINKED_RESOURCE_REFERENCE
- [System.Security.SecurityCritical] // auto_generated_required
public ResourceSet(Stream stream, Assembly assembly)
{
Reader = new ResourceReader(stream);
@@ -111,7 +102,7 @@ namespace System.Resources {
public ResourceSet(IResourceReader reader)
{
if (reader == null)
- throw new ArgumentNullException("reader");
+ throw new ArgumentNullException(nameof(reader));
Contract.EndContractBlock();
Reader = reader;
CommonInit();
@@ -122,7 +113,7 @@ namespace System.Resources {
public ResourceSet(IResourceReader reader, Assembly assembly)
{
if (reader == null)
- throw new ArgumentNullException("reader");
+ throw new ArgumentNullException(nameof(reader));
Contract.EndContractBlock();
Reader = reader;
CommonInit();
@@ -182,15 +173,13 @@ namespace System.Resources {
return typeof(ResourceReader);
}
-#if !FEATURE_CORECLR
// Returns the preferred IResourceWriter class for this kind of ResourceSet.
// Subclasses of ResourceSet using their own Readers &; should override
// GetDefaultReader and GetDefaultWriter.
public virtual Type GetDefaultWriter()
{
- return typeof(ResourceWriter);
+ return Type.GetType("System.Resources.ResourceWriter, System.Resources.Writer, Version=4.0.1.0, Culture=neutral, PublicKeyToken=" + AssemblyRef.MicrosoftPublicKeyToken, throwOnError: true);
}
-#endif // !FEATURE_CORECLR
[ComVisible(false)]
public virtual IDictionaryEnumerator GetEnumerator()
@@ -291,7 +280,7 @@ namespace System.Resources {
private Object GetObjectInternal(String name)
{
if (name == null)
- throw new ArgumentNullException("name");
+ throw new ArgumentNullException(nameof(name));
Contract.EndContractBlock();
Hashtable copyOfTable = Table; // Avoid a race with Dispose