/// <summary> /// Load the assembly object only /// </summary> /// <param name="assemblyPath"></param> /// <returns></returns> public NetAssembly LoadAssembly(string assemblyPath) { // get the cecil assembly AssemblyDefinition AsmToProfile = CecilHelper.GetAssembly(assemblyPath); if (AsmToProfile == null) { return(null); } return(new NetAssembly(AsmToProfile) { Name = AsmToProfile.Name.Name, FilePath = assemblyPath, Version = AsmToProfile.Name.Version.ToString(), Culture = AsmToProfile.Name.Culture, PublicKey = ByteHelper.ByteToHexString(AsmToProfile.Name.PublicKey), PublicKeyToken = ByteHelper.ByteToHexString(AsmToProfile.Name.PublicKeyToken), Hash = ByteHelper.ByteToHexString(AsmToProfile.Name.Hash), HashAlgorithm = AsmToProfile.Name.HashAlgorithm.ToString(), EntryPoint = AsmToProfile.EntryPoint != null?AsmToProfile.EntryPoint.ToString() : string.Empty, Kind = AsmToProfile.Kind != null?AsmToProfile.Kind.ToString() : string.Empty //IsProgram = (AsmToProfile.EntryPoint.ToString() != string.Empty && AsmToProfile.Kind.ToString() != string.Empty) }); }