Skip to content

PatchOperation is an abstract class without Value property. #42

@ewdlop

Description

@ewdlop

#if false
// Function to remove fields from patchOperations if their values are unchanged
static List FilterUnchangedFields(dynamic latestDoc, List patchOperations)
{
List filteredOperations = new();

    foreach (var op in patchOperations)
    {
        string path = op.Path.TrimStart('/');
        dynamic newValue = op.Value;
        dynamic currentValue = latestDoc[path];

        if (!Equals(currentValue, newValue))
        {
            filteredOperations.Add(op);  // Keep only changed fields
        }
        else
        {
            Console.WriteLine($"Skipping unchanged field: {path}");
        }
    }

    return filteredOperations;
}

#endif

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions