comparison Main/jungle-network/operations/NetworkPutAttributeOperation.cs @ 20:1f99e150f336

fix folder and add Object Mapper.
author Kazuma Takeda
date Thu, 15 Dec 2016 22:52:48 +0900
parents
children 1466993c104c
comparison
equal deleted inserted replaced
19:0865819106cf 20:1f99e150f336
1 using UnityEngine;
2 using System.Collections;
3
4 namespace JungleDB {
5 public class NetworkPutAttributeOperation : NodeOperation {
6
7 public string Key;
8 public byte[] Value;
9
10 public NetworkPutAttributeOperation() {
11 this.Key = null;
12 this.Value = null;
13 }
14
15 public NetworkPutAttributeOperation(string key, byte[] value){
16 this.Key = key;
17 this.Value = value;
18 }
19
20 public Command getCommand () {
21 return Command.PUT_ATTRIBUTE;
22 }
23
24 public Either<Error, TreeNode> invoke (TreeNode target) {
25 return target.getAttributes().put(this.Key, this.Value);
26 }
27
28 public string getKey () {
29 return this.Key;
30 }
31
32 public int getPosition () {
33 return -1;
34 }
35
36 public byte[] getValue () {
37 return this.Value;
38 }
39 }
40 }