12 references to CreateFromFile
Microsoft.CodeAnalysis (3)
MetadataReference\AssemblyMetadata.cs (2)
164return CreateFromFile(ModuleMetadata.CreateFromFile(path), path); 169return new AssemblyMetadata(manifestModule, moduleName => ModuleMetadata.CreateFromFile(Path.Combine(Path.GetDirectoryName(path) ?? "", moduleName)));
MetadataReference\MetadataReference.cs (1)
228/// It is recommended to use <see cref="AssemblyMetadata.CreateFromFile(string)"/> or <see cref="ModuleMetadata.CreateFromFile(string)"/>
Microsoft.CodeAnalysis.Scripting (1)
Hosting\AssemblyLoader\MetadataShadowCopyProvider.cs (1)
255newMetadata = ModuleMetadata.CreateFromFile(fullPath);
Microsoft.CodeAnalysis.UnitTests (8)
MetadataReferences\ModuleMetadataTests.cs (8)
117Assert.Throws<ArgumentNullException>(() => ModuleMetadata.CreateFromFile((string)null)); 118Assert.Throws<ArgumentException>(() => ModuleMetadata.CreateFromFile("")); 119Assert.Throws<ArgumentException>(() => ModuleMetadata.CreateFromFile(@"c:\*")); 122Assert.Throws<IOException>(() => ModuleMetadata.CreateFromFile(@"http://goo.bar")); 123Assert.Throws<FileNotFoundException>(() => ModuleMetadata.CreateFromFile(systemDrive + @":\file_that_does_not_exists.dll")); 124Assert.Throws<FileNotFoundException>(() => ModuleMetadata.CreateFromFile(systemDrive + @":\directory_that_does_not_exists\file_that_does_not_exists.dll")); 125Assert.Throws<PathTooLongException>(() => ModuleMetadata.CreateFromFile(systemDrive + @":\" + new string('x', 1000))); 126Assert.Throws<IOException>(() => ModuleMetadata.CreateFromFile(Environment.GetFolderPath(Environment.SpecialFolder.Windows)));