Class ConnectionIdentity
Represents the identity of a connection based on both server and client processes. Used for connection comparison, deduplication, and trust decisions.
Inherited Members
Namespace: Unity.AI.MCP.Editor.Models
Assembly: Unity.AI.MCP.Editor.dll
Syntax
[Serializable]
public class ConnectionIdentity
Fields
ClientIdentityKey
Identity key for the client process
Declaration
public string ClientIdentityKey
Field Value
| Type | Description |
|---|---|
| string |
CombinedIdentityKey
Combined identity key used for comparison (ServerIdentityKey|ClientIdentityKey)
Declaration
public string CombinedIdentityKey
Field Value
| Type | Description |
|---|---|
| string |
ServerIdentityKey
Identity key for the server process
Declaration
public string ServerIdentityKey
Field Value
| Type | Description |
|---|---|
| string |
Methods
Equals(object)
Compares this connection identity with another object for equality
Declaration
public override bool Equals(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj | The object to compare with |
Returns
| Type | Description |
|---|---|
| bool | True if the object is a ConnectionIdentity with matching combined identity key, false otherwise |
Overrides
GetHashCode()
Gets the hash code based on the combined identity key
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int | Hash code based on the combined identity key |
Overrides
Matches(ConnectionIdentity)
Check if this connection identity matches another. Both server AND client must match for connections to be considered equal.
Declaration
public bool Matches(ConnectionIdentity other)
Parameters
| Type | Name | Description |
|---|---|---|
| ConnectionIdentity | other | The other connection identity to compare against |
Returns
| Type | Description |
|---|---|
| bool | True if both identities match (same combined key), false otherwise |
ToString()
Returns the combined identity key as a string
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | The combined identity key string (ServerIdentityKey|ClientIdentityKey) |