コード例 #1
0
        /// <summary>
        /// Creates a new ServerConnectionInfo based on this one, but with the
        /// ServerId initialized with the supplied id.
        /// </summary>
        /// <param name="serverId"></param>
        /// <returns></returns>
        public RpcConnectionInfo SetServerId(RpcServerId serverId)
        {
            if (this.GetType() != typeof(RpcConnectionInfo))
            {
                throw new NotImplementedException("SetServerId must be implemented by derived class");
            }

            return(new RpcConnectionInfo(this.DisplayName, this.HostUrl, serverId));
        }
コード例 #2
0
 /// <summary>
 /// Initializes a new ServerConnectionInfo with the supplied displayName and serverId.
 /// </summary>
 /// <param name="displayName">The display name of the server connection.</param>
 /// <param name="serverId">Id of the server.</param>
 public RpcConnectionInfo(string displayName, Uri?hostUrl, RpcServerId serverId = default)
 {
     this.DisplayName = displayName ?? hostUrl?.Host ?? "";
     this.HostUrl     = hostUrl;
     this.ServerId    = serverId;
 }
コード例 #3
0
 public RpcConnectionInfo(RpcServerId serverId)
 {
     this.DisplayName = "";
     this.HostUrl     = null;
     this.ServerId    = serverId;
 }