public void SetEntitySetAccessRule(string name, EntitySetRights rights)
 {
     this.CheckNotSealed();
     if (name == null)
     {
         throw System.Data.Services.Error.ArgumentNull("name");
     }
     WebUtil.CheckResourceContainerRights(rights, "rights");
     if (name == "*")
     {
         this.rightsForUnspecifiedResourceContainer = rights;
     }
     else
     {
         ResourceSet set;
         if (!this.provider.TryResolveResourceSet(name, out set) || (set == null))
         {
             throw new ArgumentException(System.Data.Services.Strings.DataServiceConfiguration_ResourceSetNameNotFound(name), "name");
         }
         this.resourceRights[set.Name] = rights;
     }
 }