/// <summary> /// Initializes a new instance of the <see cref="ActorStateChange"/> class. /// </summary> /// <param name="stateName">The name of the actor state.</param> /// <param name="type">The type of value associated with given actor state name.</param> /// <param name="value">The value associated with given actor state name.</param> /// <param name="changeKind">The kind of state change for given actor state name.</param> public ActorStateChange(string stateName, Type type, object value, StateChangeKind changeKind) { ArgumentVerifier.ThrowIfNull(stateName, nameof(stateName)); this.StateName = stateName; this.Type = type; this.Value = value; this.ChangeKind = changeKind; }
/// <summary> /// Creates an instance of ActorStateChange class. /// </summary> /// <param name="stateName">Name of the actor state</param> /// <param name="type">Type of value associated with given actor state name.</param> /// <param name="value">Value associated with given actor state name.</param> /// <param name="changeKind">Kind of state change for given actor state name.</param> public ActorStateChange(string stateName, Type type, object value, StateChangeKind changeKind) { Requires.Argument("stateName", stateName).NotNull(); this.stateName = stateName; this.type = type; this.value = value; this.changeKind = changeKind; }
private string GetDaprStateOperation(StateChangeKind changeKind) { var operation = string.Empty; switch (changeKind) { case StateChangeKind.Remove: operation = "delete"; break; case StateChangeKind.Add: case StateChangeKind.Update: operation = "upsert"; break; default: break; } return operation; }
public SerializedStateChange(StateChangeKind changeKind, string key, byte[] serializedState) { this.changeKind = changeKind; this.key = key; this.serializedState = serializedState; }
public static StateMetadata Create <T>(T value, StateChangeKind changeKind) { return(new StateMetadata(value, typeof(T), changeKind)); }
private StateMetadata(object value, Type type, StateChangeKind changeKind) { this.Value = value; this.Type = type; this.ChangeKind = changeKind; }