# RelationshipSnapshot Methods

- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Type: [RelationshipSnapshot](/reference/api/csharp/aspire.hosting/relationshipsnapshot.md)
- Kind: `Methods`
- Members: `8`

A snapshot of a relationship.

## <Clone>$

- Name: `<Clone>$`
- Returns: [RelationshipSnapshot](/reference/api/csharp/aspire.hosting/relationshipsnapshot.md)

```csharp
public record RelationshipSnapshot
{
    public RelationshipSnapshot <Clone>$()
    {
        // ...
    }
}
```

## Deconstruct(string, string)

- Name: `Deconstruct(string, string)`

```csharp
public record RelationshipSnapshot
{
    public void Deconstruct(
        out string ResourceName,
        out string Type)
    {
        // ...
    }
}
```

## Parameters

- `ResourceName` (`string`)
- `Type` (`string`)

## Equals(object?)

- Name: `Equals(object?)`
- Modifiers: `override`
- Returns: `bool`

Determines whether the specified object is equal to the current object.

```csharp
public record RelationshipSnapshot
{
    public override bool Equals(
        object? obj)
    {
        // ...
    }
}
```

## Parameters

- `obj` (`object?`)
  The object to compare with the current object.

## Returns

`bool` -- `true` if the specified object is equal to the current object; otherwise, `false`.

## Equals(RelationshipSnapshot?)

- Name: `Equals(RelationshipSnapshot?)`
- Returns: `bool`

Indicates whether the current object is equal to another object of the same type.

```csharp
public record RelationshipSnapshot
{
    public bool Equals(
        RelationshipSnapshot? other)
    {
        // ...
    }
}
```

## Parameters

- `other` ([RelationshipSnapshot?](/reference/api/csharp/aspire.hosting/relationshipsnapshot.md))
  An object to compare with this object.

## Returns

`bool` -- `true` if the current object is equal to the `other` parameter; otherwise, `false`.

## GetHashCode

- Name: `GetHashCode`
- Modifiers: `override`
- Returns: `int`

Serves as the default hash function.

```csharp
public record RelationshipSnapshot
{
    public override int GetHashCode()
    {
        // ...
    }
}
```

## Returns

`int` -- A hash code for the current object.

## op_Equality(RelationshipSnapshot?, RelationshipSnapshot?)

- Name: `op_Equality(RelationshipSnapshot?, RelationshipSnapshot?)`
- Modifiers: `static`
- Returns: `bool`

```csharp
public record RelationshipSnapshot
{
    public static bool operator ==(
        RelationshipSnapshot? left,
        RelationshipSnapshot? right)
    {
        // ...
    }
}
```

## Parameters

- `left` ([RelationshipSnapshot?](/reference/api/csharp/aspire.hosting/relationshipsnapshot.md))
- `right` ([RelationshipSnapshot?](/reference/api/csharp/aspire.hosting/relationshipsnapshot.md))

## op_Inequality(RelationshipSnapshot?, RelationshipSnapshot?)

- Name: `op_Inequality(RelationshipSnapshot?, RelationshipSnapshot?)`
- Modifiers: `static`
- Returns: `bool`

```csharp
public record RelationshipSnapshot
{
    public static bool operator !=(
        RelationshipSnapshot? left,
        RelationshipSnapshot? right)
    {
        // ...
    }
}
```

## Parameters

- `left` ([RelationshipSnapshot?](/reference/api/csharp/aspire.hosting/relationshipsnapshot.md))
- `right` ([RelationshipSnapshot?](/reference/api/csharp/aspire.hosting/relationshipsnapshot.md))

## ToString

- Name: `ToString`
- Modifiers: `override`
- Returns: `string`

Returns a string that represents the current object.

```csharp
public record RelationshipSnapshot
{
    public override string ToString()
    {
        // ...
    }
}
```

## Returns

`string` -- A string that represents the current object.
