示例#1
0
        public IpcHandleType(JArray json)
        {
            switch (json[1][0].Value <string>())
            {
            case "copy":
                Style = HandleStyle.Copy;
                break;

            case "move":
                Style = HandleStyle.Move;
                break;

            case "unknown":
                Style = HandleStyle.Unknown;
                break;

            case { } x: throw new NotImplementedException(x);
            }
            if (json[1].Count() >= 2)
            {
                Type = Parse(json[1][1].Value <JArray>());
            }
        }
示例#2
0
 public IpcParameter(string name, IpcType type)
 {
     Name = name;
     Type = type;
 }
示例#3
0
 public IpcParameter(JArray arr)
 {
     Name = arr[0]?.Value <string>();
     Type = IpcType.Parse(arr[1].Value <JArray>());
 }
示例#4
0
 public IpcEnumType(JArray json)
 {
     UnderlyingType = Parse(new JArray(json[2]));
     Options        = json[1].Select(x => (x[0].Value <string>(), x[1].Value <int>())).ToDictionary();
 }
示例#5
0
 public void Deconstruct(out IpcType type, out int transferType)
 {
     type         = Type;
     transferType = TransferType;
 }
示例#6
0
 public IpcBufferType(JArray json)
 {
     Type         = Parse(json[1].Value <JArray>());
     TransferType = json[2].Value <int>();
 }
示例#7
0
 public void Deconstruct(out HandleStyle style, out IpcType type)
 {
     style = Style;
     type  = Type;
 }