csharp-sdk-upm/Storage/Source/Internal/Operation/AVSetOperation.cs

22 lines
498 B
C#
Raw Normal View History

2019-07-19 15:01:34 +08:00
namespace LeanCloud.Storage.Internal {
public class AVSetOperation : IAVFieldOperation {
public AVSetOperation(object value) {
Value = value;
}
public object Encode() {
return PointerOrLocalIdEncoder.Instance.Encode(Value);
}
public IAVFieldOperation MergeWithPrevious(IAVFieldOperation previous) {
return this;
}
public object Apply(object oldValue, string key) {
return Value;
}
public object Value { get; private set; }
}
}