# ResourceStateSnapshot

- 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<ResourceStateSnapshot>`

A snapshot of the resource state

## Definition

```csharp
namespace Aspire.Hosting.ApplicationModel;

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

## Constructors

- [ResourceStateSnapshot(string, string?)](/reference/api/csharp/aspire.hosting/resourcestatesnapshot/constructors.md#constructor-string-string) -- A snapshot of the resource state

## Properties

- [Style](/reference/api/csharp/aspire.hosting/resourcestatesnapshot/properties.md#style) : `string?` `get; init` -- The style for the state update. Use for the supported styles.
- [Text](/reference/api/csharp/aspire.hosting/resourcestatesnapshot/properties.md#text) : `string` `get; init` -- The text for the state update. See [KnownResourceStates](/reference/api/csharp/aspire.hosting/knownresourcestates.md) for expected values.

## Methods

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