MSDN Docs

Idempotent Interface

Namespace

System

Assembly

System.Runtime.dll

Definition

public interface Idempotent
{
    // Marker interface - no members
}

The Idempotent interface is a marker used to indicate that operations implementing this interface are idempotent, meaning they can be called multiple times without changing the result beyond the initial application.

Usage

Implement the interface on classes whose public methods are guaranteed to be idempotent.

public class CacheUpdater : Idempotent
{
    public void Update(string key, string value)
    {
        // Implementation ensures repeated calls with same parameters
        // produce the same state.
        // ...
    }
}

Remarks

See Also

Related Types
ICancelable
IDeferred
System.IO Namespace