# RelationshipSnapshot

- Kind: `record`
- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Version: `13.3.0`
- Namespace: `Aspire.Hosting.ApplicationModel`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/bd20f904cde09ecb9c9ae5116a6f13614bf2d7c2/src/Aspire.Hosting/ApplicationModel/CustomResourceSnapshot.cs)
- Implements: `IEquatable<RelationshipSnapshot>`

A snapshot of a relationship.

## Definition

```csharp
namespace Aspire.Hosting.ApplicationModel;

public sealed record RelationshipSnapshot
    : System.IEquatable<Aspire.Hosting.ApplicationModel.RelationshipSnapshot>
{
    // ...
}
```

## Constructors

- [RelationshipSnapshot(string, string)](/reference/api/csharp/aspire.hosting/relationshipsnapshot/constructors.md#constructor-string-string) -- A snapshot of a relationship.

## Properties

- [ResourceName](/reference/api/csharp/aspire.hosting/relationshipsnapshot/properties.md#resourcename) : `string` `get; init` -- The name of the resource the relationship is to.
- [Type](/reference/api/csharp/aspire.hosting/relationshipsnapshot/properties.md#type) : `string` `get; init` -- The relationship type.

## Methods

- [<Clone>$](/reference/api/csharp/aspire.hosting/relationshipsnapshot/methods.md#clone) : [RelationshipSnapshot](/reference/api/csharp/aspire.hosting/relationshipsnapshot.md)
- [Deconstruct(string, string)](/reference/api/csharp/aspire.hosting/relationshipsnapshot/methods.md#deconstruct-string-string)
- [Equals(object?)](/reference/api/csharp/aspire.hosting/relationshipsnapshot/methods.md#equals-object) : `bool` -- Determines whether the specified object is equal to the current object.
- [Equals(RelationshipSnapshot?)](/reference/api/csharp/aspire.hosting/relationshipsnapshot/methods.md#equals-relationshipsnapshot) : `bool` -- Indicates whether the current object is equal to another object of the same type.
- [GetHashCode](/reference/api/csharp/aspire.hosting/relationshipsnapshot/methods.md#gethashcode) : `int` -- Serves as the default hash function.
- [op_Equality(RelationshipSnapshot?, RelationshipSnapshot?)](/reference/api/csharp/aspire.hosting/relationshipsnapshot/methods.md#op-equality-relationshipsnapshot-relationshipsnapshot) : `bool` `static`
- [op_Inequality(RelationshipSnapshot?, RelationshipSnapshot?)](/reference/api/csharp/aspire.hosting/relationshipsnapshot/methods.md#op-inequality-relationshipsnapshot-relationshipsnapshot) : `bool` `static`
- [ToString](/reference/api/csharp/aspire.hosting/relationshipsnapshot/methods.md#tostring) : `string` -- Returns a string that represents the current object.
