Example #1
0
 protected void ProcessTypeQueue()
 {
     while (PendingPropTypes.Count > 0)
     {
         var theType = PendingPropTypes.Dequeue();
         UnwrapType(null, theType);
         GetReferencedBy(theType);
     }
 }
Example #2
0
 /// <summary>
 /// Get all types referenced by the types from specified assembly.
 /// </summary>
 /// <param name="assembly"></param>
 /// <param name="settings"></param>
 public void GetReferencedTypes(Assembly assembly, ReflectionSettings settings = null)
 {
     Init(settings);
     foreach (var type in assembly.GetTypes())
     {
         PendingPropTypes.Enqueue(type);
     }
     ProcessTypeQueue();
 }
Example #3
0
 /// <summary>
 /// Get all types referenced by the types from specified assemblies.
 /// Reflection information for the specified type is also returned.
 /// </summary>
 /// <param name="assemblies"></param>
 /// <param name="settings"></param>
 /// <returns></returns>
 public void GetReferencedTypes(IEnumerable <Assembly> assemblies, ReflectionSettings settings = null)
 {
     Init(settings);
     foreach (var assembly in assemblies)
     {
         foreach (var type in assembly.GetTypes())
         {
             PendingPropTypes.Enqueue(type);
         }
     }
     ProcessTypeQueue();
 }
Example #4
0
        void AddTypeToCheckProps(Type parentType, Type type)
        {
            var newRef = new TypeInformation()
            {
                Type = type
            };

            newRef.ReferencesIn.Add(parentType);
            if (parentType != null)
            {
                ReferencedTypes[parentType].ReferencesOut.Add(type);
            }
            ReferencedTypes.Add(type, newRef);
            PendingPropTypes.Enqueue(type);
        }
Example #5
0
 /// <summary>
 /// Get all types referenced by the specified type.
 /// Reflection information for the specified type is also returned.
 /// </summary>
 /// <param name="type"></param>
 /// <param name="settings"></param>
 public void GetReferencedTypes(Type type, ReflectionSettings settings = null)
 {
     Init(settings);
     PendingPropTypes.Enqueue(type);
     ProcessTypeQueue();
 }