Esempio n. 1
0
 /// <summary>
 /// Adds the specified document to the queue.
 /// </summary>
 public void AddDocument(NamedXmlDocument document)
 {
     MappingsQueueEntry re = new MappingsQueueEntry(
         document,
         ClassExtractor.GetClassEntries(document.Document));
     AddEntry(re);
 }
		private void AddEntry(MappingsQueueEntry re)
		{
			if (CanProcess(re))
			{
				availableEntries.Enqueue(re);
			}
			else
			{
				unavailableEntries.Add(re);
			}
		}
Esempio n. 3
0
 private void AddEntry(MappingsQueueEntry re)
 {
     if (CanProcess(re))
     {
         _availableEntries.Enqueue(re);
     }
     else
     {
         _unavailableEntries.Add(re);
     }
 }
Esempio n. 4
0
 private bool CanProcess(MappingsQueueEntry ce)
 {
     foreach (var c in ce.RequiredClassNames)
     {
         if (!(_processedClassNames.Contains(c.FullClassName) || _processedClassNames.Contains(c.EntityName)))
         {
             return(false);
         }
     }
     return(true);
 }
Esempio n. 5
0
        /// <summary>
        /// Gets a <see cref="NamedXmlDocument" /> that can now be processed (i.e.
        /// that doesn't depend on classes not yet processed).
        /// </summary>
        /// <returns></returns>
        public NamedXmlDocument GetNextAvailableResource()
        {
            if (_availableEntries.Count == 0)
            {
                return(null);
            }

            MappingsQueueEntry entry = (MappingsQueueEntry)_availableEntries.Dequeue();

            AddProcessedClassNames(entry.ContainedClassNames);
            return(entry.Document);
        }
		private bool CanProcess(MappingsQueueEntry ce)
		{
			return
				ce.RequiredClassNames.All(
					c => (processedClassNames.Contains(c.FullClassName) || processedClassNames.Contains(c.EntityName)));
		}
Esempio n. 7
0
        /// <summary>
        /// Adds the specified document to the queue.
        /// </summary>
        public void AddDocument(NamedXmlDocument document)
        {
            MappingsQueueEntry re = new MappingsQueueEntry(document, ClassExtractor.GetClassEntries(document.Document));

            AddEntry(re);
        }
 private bool CanProcess(MappingsQueueEntry ce)
 {
     return
         (ce.RequiredClassNames.All(
              c => (processedClassNames.Contains(c.FullClassName) || processedClassNames.Contains(c.EntityName))));
 }
		private bool CanProcess(MappingsQueueEntry ce)
		{
			foreach (var c in ce.RequiredClassNames)
			{
				if (!(_processedClassNames.Contains(c.FullClassName) || _processedClassNames.Contains(c.EntityName)))
					return false;
			}
			return true;
		}
Esempio n. 10
0
 private bool CanProcess(MappingsQueueEntry ce)
 {
     return _processedClassNames.ContainsAll(ce.RequiredClassNames);
 }