public static RuntimeHost Get(RuntimeHostId id) { if (ms_runtimeHosts.TryGetValue(id, out var runtimeHost)) { return(runtimeHost); } return(ms_runtimeHosts.GetOrAdd(id, _ => new RemoteRuntimeHost(_.AssemblyQualifiedName))); }
public RuntimeHost(IUnityContainer container, PSharpRuntime runtime) { Container = container ?? throw new ArgumentNullException(nameof(container)); Runtime = runtime ?? throw new ArgumentNullException(nameof(runtime)); Id = new RuntimeHostId() { AdditionalConfiguration = runtime.GetAdditionalConfiguration() }; Id.SetNetworkInformation(runtime.NetworkProvider); RuntimeHostReferences.Register(this); }