public TestMetadataReferenceInfo( MemoryStream emitStream, Compilation compilation, TestMetadataReference metadataReference, string fullPath ) { _emitStream = emitStream; _peReader = new PEReader(emitStream); Compilation = compilation; MetadataReference = metadataReference; var metadataReader = _peReader.GetMetadataReader(); var moduleDefinition = metadataReader.GetModuleDefinition(); MetadataReferenceInfo = new MetadataReferenceInfo( _peReader.PEHeaders.CoffHeader.TimeDateStamp, _peReader.PEHeaders.PEHeader.SizeOfImage, PathUtilities.GetFileName(fullPath), metadataReader.GetGuid(moduleDefinition.Mvid), metadataReference.Properties.Aliases, metadataReference.Properties.Kind, metadataReference.Properties.EmbedInteropTypes ); }
internal void AssertEqual(MetadataReferenceInfo other) { Assert.Equal(Name, other.Name); Assert.Equal(Timestamp, other.Timestamp); Assert.Equal(ImageSize, other.ImageSize); Assert.Equal(Mvid, other.Mvid); Assert.Equal(ExternAliases, other.ExternAliases); Assert.Equal(Kind, other.Kind); Assert.Equal(EmbedInteropTypes, other.EmbedInteropTypes); }