public AssemblyInterfaceData(IAssemblyWrapper assemblyToAnalyze)
        {
            Assembly = assemblyToAnalyze;

            Name = Assembly.GetName().Name;
            Version = "v" + Assembly.GetName().Version;
            CLRVersion = Assembly.ImageRuntimeVersion;

            ReferencedAssemblies = Assembly.GetReferencedAssemblies().Select(x => x.FullName).ToList();

            var types = Assembly.GetTypes();

            foreach (var type in types)
            {
                var typeEnumValue = GetTypeEnumValueForType(type);
                switch (typeEnumValue)
                {
                    case TypeEnum.Class:
                        Classes.Add(new ClassTypeData(type));
                        break;
                    case TypeEnum.Interface:
                        Interfaces.Add(new InterfaceTypeData(type));
                        break;
                    case TypeEnum.Enum:
                        Enums.Add(new EnumTypeData(type));
                        break;
                    case TypeEnum.Struct:
                        Structs.Add(new StructTypeData(type));
                        break;
                }
            }

            Classes = Classes.OrderBy(x => x.Name).ToList();
            Interfaces = Interfaces.OrderBy(x => x.Name).ToList();
            Enums = Enums.OrderBy(x => x.Name).ToList();
            Structs = Structs.OrderBy(x => x.Name).ToList();
        }
Example #2
0
		protected virtual void HotReplaceAssembly(IAssemblyWrapper wrapper, MemoryStream stream)
		{
		}
Example #3
0
		protected override void HotReplaceAssembly(IAssemblyWrapper wrapper, MemoryStream stream)
		{
			var ilspyWrapper = wrapper as ILSpyAssemblyWrapper;
			if (ilspyWrapper == null)
				return;

			var loadedAssembly = ilspyWrapper.LoadedAssembly;
			if (loadedAssembly == null)
				return;

			loadedAssembly.AssemblyList.HotReplaceAssembly(loadedAssembly.FileName, stream);
		}