public ActorRegistry Build() { ActorRegistry registry = _builder.Build(); Serializer serializer = _serializerFactory(); Scheduler scheduler = _builder.Scheduler; var registryNode = new RemoteRegistryNode(registry, _listenUri, _fiberFactory, scheduler, serializer); registry.AddNode(registryNode); return(registry); }
public TypeRegistry([NotNull] Compilation compilation) { var builder = new RegistryBuilder(compilation); builder.IncludePair("System.IO.Directory", "TestableFileSystem.Interfaces.IDirectory"); builder.IncludePair("System.IO.DirectoryInfo", "TestableFileSystem.Interfaces.IDirectoryInfo"); builder.IncludePair("System.IO.File", "TestableFileSystem.Interfaces.IFile"); builder.IncludePair("System.IO.FileInfo", "TestableFileSystem.Interfaces.IFileInfo"); builder.IncludePair("System.IO.FileSystemInfo", "TestableFileSystem.Interfaces.IFileSystemInfo"); builder.IncludePair("System.IO.FileStream", "TestableFileSystem.Interfaces.IFileStream"); typeMap = builder.Build(); TestableExtensionTypes = new List <INamedTypeSymbol> { compilation.GetTypeByMetadataName("TestableFileSystem.Interfaces.FileExtensions"), compilation.GetTypeByMetadataName("TestableFileSystem.Interfaces.FileInfoExtensions") }; IsComplete = builder.FoundAll && TestableExtensionTypes.All(x => x != null); }
public TypeRegistry([NotNull] Compilation compilation) { var builder = new RegistryBuilder(compilation); builder.IncludePair("File", "IFile"); builder.IncludePair("Directory", "IDirectory"); builder.IncludePair("Path", "IPath"); builder.IncludePair("FileInfo", "IFileInfo"); builder.IncludePair("DirectoryInfo", "IDirectoryInfo"); builder.IncludePair("FileSystemInfo", "IFileSystemInfo"); builder.IncludePair("DriveInfo", "IDriveInfo"); builder.IncludePair("FileStream", "IFileStream"); builder.IncludePair("FileSystemWatcher", "IFileSystemWatcher"); typeMap = builder.Build(); TestableExtensionTypes = new List <INamedTypeSymbol> { compilation.GetTypeByMetadataName(CodeNamespace.Combine(CodeNamespace.TestableInterfaces, "FileExtensions")), compilation.GetTypeByMetadataName(CodeNamespace.Combine(CodeNamespace.TestableInterfaces, "FileInfoExtensions")) }; IsComplete = typeMap.Any() && TestableExtensionTypes.All(x => x != null); }