コード例 #1
0
        public static RuntimeHost Get(RuntimeHostId id)
        {
            if (ms_runtimeHosts.TryGetValue(id, out var runtimeHost))
            {
                return(runtimeHost);
            }

            return(ms_runtimeHosts.GetOrAdd(id, _ => new RemoteRuntimeHost(_.AssemblyQualifiedName)));
        }
コード例 #2
0
ファイル: RuntimeHost.cs プロジェクト: urasandesu/Bondage
 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);
 }