protected void ProcessTypeQueue() { while (PendingPropTypes.Count > 0) { var theType = PendingPropTypes.Dequeue(); UnwrapType(null, theType); GetReferencedBy(theType); } }
/// <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(); }
/// <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(); }
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); }
/// <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(); }