# ResourceCommandSnapshot Methods

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

A snapshot of a resource command.

## <Clone>$

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

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

## Deconstruct(string, ResourceCommandState, string, string?, object?, string?, string?, IconVariant?, bool)

- Name: `Deconstruct(string, ResourceCommandState, string, string?, object?, string?, string?, IconVariant?, bool)`

```csharp
public record ResourceCommandSnapshot
{
    public void Deconstruct(
        out string Name,
        out ResourceCommandState State,
        out string DisplayName,
        out string? DisplayDescription,
        out object? Parameter,
        out string? ConfirmationMessage,
        out string? IconName,
        out IconVariant? IconVariant,
        out bool IsHighlighted)
    {
        // ...
    }
}
```

## Parameters

- `Name` (`string`)
- `State` ([ResourceCommandState](/reference/api/csharp/aspire.hosting/resourcecommandstate.md))
- `DisplayName` (`string`)
- `DisplayDescription` (`string?`)
- `Parameter` (`object?`)
- `ConfirmationMessage` (`string?`)
- `IconName` (`string?`)
- `IconVariant` ([IconVariant?](/reference/api/csharp/aspire.hosting/iconvariant.md))
- `IsHighlighted` (`bool`)

## Equals(object?)

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

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

```csharp
public record ResourceCommandSnapshot
{
    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(ResourceCommandSnapshot?)

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

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

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

## Parameters

- `other` ([ResourceCommandSnapshot?](/reference/api/csharp/aspire.hosting/resourcecommandsnapshot.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 ResourceCommandSnapshot
{
    public override int GetHashCode()
    {
        // ...
    }
}
```

## Returns

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

## op_Equality(ResourceCommandSnapshot?, ResourceCommandSnapshot?)

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

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

## Parameters

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

## op_Inequality(ResourceCommandSnapshot?, ResourceCommandSnapshot?)

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

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

## Parameters

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

## ToString

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

Returns a string that represents the current object.

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

## Returns

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