public virtual ICollection <ICollection <TData> > GetCollectionsForDescriptor(INonTerminalDescriptor descriptor)
        {
            if (!CollectionsByDescriptor.ContainsKey(descriptor))
            {
                CollectionsByDescriptor[descriptor] = new List <ICollection <TData> >();
            }

            return(CollectionsByDescriptor[descriptor]);
        }
 public virtual bool IsCollectionRegisteredWithDescriptor(ICollection <TData> collection, INonTerminalDescriptor descriptor)
 {
     return(CollectionsByDescriptor.ContainsKey(descriptor) &&
            CollectionsByDescriptor[descriptor].Contains(collection));
 }