protected override ResourceSet InternalGetResourceSet(CultureInfo culture, bool createIfNotExists, bool tryParents) { DatabaseResourceSet rs = null; if (ResourceSets.Contains(culture.Name)) { rs = ResourceSets[culture.Name] as DatabaseResourceSet; } else { lock (ResourceSets) { // Check hash table once again after lock is set if (ResourceSets.Contains(culture.Name)) { rs = ResourceSets[culture.Name] as DatabaseResourceSet; } else { rs = new DatabaseResourceSet(dsn, culture, sp); ResourceSets.Add(culture.Name, rs); } } } return rs; }
protected override ResourceSet InternalGetResourceSet(CultureInfo culture, bool createIfNotExists, bool tryParents) { DatabaseResourceSet rs = null; if (ResourceSets.Contains(culture.Name)) { rs = ResourceSets[culture.Name] as DatabaseResourceSet; } else { lock (ResourceSets) { // Check hash table once again after lock is set if (ResourceSets.Contains(culture.Name)) { rs = ResourceSets[culture.Name] as DatabaseResourceSet; } else { rs = new DatabaseResourceSet(dsn, culture, sp); ResourceSets.Add(culture.Name, rs); } } } return(rs); }