garrett vor 4 Jahren
Ursprung
Commit
93562a2307

+ 1 - 1
Dispatcher/NettyClient/NettyClient.csproj

@@ -118,8 +118,8 @@
   </ItemGroup>
   <ItemGroup>
     <Compile Include="ClientWrapper.cs" />
+    <None Include="proto\MessageProto.cs-bak" />
     <Compile Include="proto\MessageProto.cs" />
-    <Compile Include="proto\MessageProtoStr.cs" />
     <Compile Include="proto\MessageUtil.cs" />
     <Compile Include="TaskNettyClient.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />

+ 1 - 1
Dispatcher/NettyClient/TaskNettyClient.cs

@@ -7,7 +7,7 @@ using System.Threading;
 using System.Threading.Tasks;
 using System.Windows.Forms;
 using DotNetty.Codecs.Protobuf;
-using Message = NettyClient.proto.Message;
+using Message = Google.Protobuf.WellKnownTypes.Message;
 
 namespace NettyClient
 {

+ 80 - 75
Dispatcher/NettyClient/proto/MessageProto.cs

@@ -5,69 +5,71 @@
 #pragma warning disable 1591, 0612, 3021
 #region Designer generated code
 
-using pb = Google.Protobuf;
-using pbr = Google.Protobuf.Reflection;
-namespace NettyClient.proto
-{
+using pb = global::Google.Protobuf;
+using pbc = global::Google.Protobuf.Collections;
+using pbr = global::Google.Protobuf.Reflection;
+using scg = global::System.Collections.Generic;
+namespace Google.Protobuf.WellKnownTypes {
 
-    /// <summary>Holder for reflection information generated from MessageProto.proto</summary>
-    public static partial class MessageProtoReflection {
+  /// <summary>Holder for reflection information generated from MessageProto.proto</summary>
+  public static partial class MessageProtoReflection {
 
     #region Descriptor
     /// <summary>File descriptor for MessageProto.proto</summary>
-    public static pbr.FileDescriptor Descriptor {
+    public static pbr::FileDescriptor Descriptor {
       get { return descriptor; }
     }
-    private static pbr.FileDescriptor descriptor;
+    private static pbr::FileDescriptor descriptor;
 
     static MessageProtoReflection() {
-      byte[] descriptorData = System.Convert.FromBase64String(
+      byte[] descriptorData = global::System.Convert.FromBase64String(
           string.Concat(
             "ChJNZXNzYWdlUHJvdG8ucHJvdG8SEmNuLnNhZ2FjbG91ZC5wcm90byI3CgdN",
-            "ZXNzYWdlEgsKA2NtZBgBIAEoCRIOCgZ0YXNrSWQYAiABKAUSDwoHY29udGVu",
-            "dBgDIAEoCUIQQgxNZXNzYWdlUHJvdG9IAWIGcHJvdG8z"));
-      descriptor = pbr.FileDescriptor.FromGeneratedCode(descriptorData,
-          new pbr.FileDescriptor[] { },
-          new pbr.GeneratedClrTypeInfo(null, new pbr.GeneratedClrTypeInfo[] {
-            new pbr.GeneratedClrTypeInfo(typeof(Message), Message.Parser, new[]{ "Cmd", "TaskId", "Content" }, null, null, null)
+            "ZXNzYWdlEgsKA2NtZBgBIAEoCRIOCgZ0YXNrSWQYAiABKAkSDwoHY29udGVu",
+            "dBgDIAEoCUI0Qg9NZXNzYWdlUHJvdG9TdHJIAaoCHkdvb2dsZS5Qcm90b2J1",
+            "Zi5XZWxsS25vd25UeXBlc2IGcHJvdG8z"));
+      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
+          new pbr::FileDescriptor[] { },
+          new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
+            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKnownTypes.Message), global::Google.Protobuf.WellKnownTypes.Message.Parser, new[]{ "Cmd", "TaskId", "Content" }, null, null, null, null)
           }));
     }
     #endregion
 
   }
   #region Messages
-  public sealed partial class Message : pb.IMessage<Message> {
-    private static readonly pb.MessageParser<Message> _parser = new pb.MessageParser<Message>(() => new Message());
-     //04 private pb.UnknownFieldSet _unknownFields;
-    [System.Diagnostics.DebuggerNonUserCodeAttribute]
-    public static pb.MessageParser<Message> Parser { get { return _parser; } }
-
-    [System.Diagnostics.DebuggerNonUserCodeAttribute]
-    public static pbr.MessageDescriptor Descriptor {
-      get { return MessageProtoReflection.Descriptor.MessageTypes[0]; }
+  public sealed partial class Message : pb::IMessage<Message> {
+    private static readonly pb::MessageParser<Message> _parser = new pb::MessageParser<Message>(() => new Message());
+    private pb::UnknownFieldSet _unknownFields;
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+    public static pb::MessageParser<Message> Parser { get { return _parser; } }
+
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+    public static pbr::MessageDescriptor Descriptor {
+      get { return global::Google.Protobuf.WellKnownTypes.MessageProtoReflection.Descriptor.MessageTypes[0]; }
     }
 
-    [System.Diagnostics.DebuggerNonUserCodeAttribute]
-    pbr.MessageDescriptor pb.IMessage.Descriptor {
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+    pbr::MessageDescriptor pb::IMessage.Descriptor {
       get { return Descriptor; }
     }
 
-    [System.Diagnostics.DebuggerNonUserCodeAttribute]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
     public Message() {
       OnConstruction();
     }
 
     partial void OnConstruction();
 
-    [System.Diagnostics.DebuggerNonUserCodeAttribute]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
     public Message(Message other) : this() {
       cmd_ = other.cmd_;
       taskId_ = other.taskId_;
       content_ = other.content_;
-        //04  _unknownFields = pb.UnknownFieldSet.Clone(other._unknownFields);
-        }
+      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
+    }
 
-        [System.Diagnostics.DebuggerNonUserCodeAttribute]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
     public Message Clone() {
       return new Message(this);
     }
@@ -75,42 +77,42 @@ namespace NettyClient.proto
     /// <summary>Field number for the "cmd" field.</summary>
     public const int CmdFieldNumber = 1;
     private string cmd_ = "";
-    [System.Diagnostics.DebuggerNonUserCodeAttribute]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
     public string Cmd {
       get { return cmd_; }
       set {
-        cmd_ = pb.ProtoPreconditions.CheckNotNull(value, "value");
+        cmd_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
       }
     }
 
     /// <summary>Field number for the "taskId" field.</summary>
     public const int TaskIdFieldNumber = 2;
-    private int taskId_;
-    [System.Diagnostics.DebuggerNonUserCodeAttribute]
-    public int TaskId {
+    private string taskId_ = "";
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+    public string TaskId {
       get { return taskId_; }
       set {
-        taskId_ = value;
+        taskId_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
       }
     }
 
     /// <summary>Field number for the "content" field.</summary>
     public const int ContentFieldNumber = 3;
     private string content_ = "";
-    [System.Diagnostics.DebuggerNonUserCodeAttribute]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
     public string Content {
       get { return content_; }
       set {
-        content_ = pb.ProtoPreconditions.CheckNotNull(value, "value");
+        content_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
       }
     }
 
-    [System.Diagnostics.DebuggerNonUserCodeAttribute]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
     public override bool Equals(object other) {
       return Equals(other as Message);
     }
 
-    [System.Diagnostics.DebuggerNonUserCodeAttribute]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
     public bool Equals(Message other) {
       if (ReferenceEquals(other, null)) {
         return false;
@@ -121,61 +123,64 @@ namespace NettyClient.proto
       if (Cmd != other.Cmd) return false;
       if (TaskId != other.TaskId) return false;
       if (Content != other.Content) return false;
-        //04  return Equals(_unknownFields, other._unknownFields);
-            return true;
+      return Equals(_unknownFields, other._unknownFields);
     }
 
-        [System.Diagnostics.DebuggerNonUserCodeAttribute]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
     public override int GetHashCode() {
       int hash = 1;
       if (Cmd.Length != 0) hash ^= Cmd.GetHashCode();
-      if (TaskId != 0) hash ^= TaskId.GetHashCode();
+      if (TaskId.Length != 0) hash ^= TaskId.GetHashCode();
       if (Content.Length != 0) hash ^= Content.GetHashCode();
-            //04   if (_unknownFields != null) {hash ^= _unknownFields.GetHashCode();}
-            return hash;
+      if (_unknownFields != null) {
+        hash ^= _unknownFields.GetHashCode();
+      }
+      return hash;
     }
 
-    [System.Diagnostics.DebuggerNonUserCodeAttribute]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
     public override string ToString() {
-      return pb.JsonFormatter.ToDiagnosticString(this);
+      return pb::JsonFormatter.ToDiagnosticString(this);
     }
 
-    [System.Diagnostics.DebuggerNonUserCodeAttribute]
-    public void WriteTo(pb.CodedOutputStream output) {
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+    public void WriteTo(pb::CodedOutputStream output) {
       if (Cmd.Length != 0) {
         output.WriteRawTag(10);
         output.WriteString(Cmd);
       }
-      if (TaskId != 0) {
-        output.WriteRawTag(16);
-        output.WriteInt32(TaskId);
+      if (TaskId.Length != 0) {
+        output.WriteRawTag(18);
+        output.WriteString(TaskId);
       }
       if (Content.Length != 0) {
         output.WriteRawTag(26);
         output.WriteString(Content);
       }
+      if (_unknownFields != null) {
+        _unknownFields.WriteTo(output);
+      }
+    }
 
-        //04    if (_unknownFields != null){_unknownFields.WriteTo(output);}
-        }
-
-        [System.Diagnostics.DebuggerNonUserCodeAttribute]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
     public int CalculateSize() {
       int size = 0;
       if (Cmd.Length != 0) {
-        size += 1 + pb.CodedOutputStream.ComputeStringSize(Cmd);
+        size += 1 + pb::CodedOutputStream.ComputeStringSize(Cmd);
       }
-      if (TaskId != 0) {
-        size += 1 + pb.CodedOutputStream.ComputeInt32Size(TaskId);
+      if (TaskId.Length != 0) {
+        size += 1 + pb::CodedOutputStream.ComputeStringSize(TaskId);
       }
       if (Content.Length != 0) {
-        size += 1 + pb.CodedOutputStream.ComputeStringSize(Content);
+        size += 1 + pb::CodedOutputStream.ComputeStringSize(Content);
       }
-
-            //04    if (_unknownFields != null){size += _unknownFields.CalculateSize();}
-            return size;
+      if (_unknownFields != null) {
+        size += _unknownFields.CalculateSize();
+      }
+      return size;
     }
 
-    [System.Diagnostics.DebuggerNonUserCodeAttribute]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
     public void MergeFrom(Message other) {
       if (other == null) {
         return;
@@ -183,29 +188,29 @@ namespace NettyClient.proto
       if (other.Cmd.Length != 0) {
         Cmd = other.Cmd;
       }
-      if (other.TaskId != 0) {
+      if (other.TaskId.Length != 0) {
         TaskId = other.TaskId;
       }
       if (other.Content.Length != 0) {
         Content = other.Content;
       }
-        //04  _unknownFields = pb.UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
-        }
+      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+    }
 
-        [System.Diagnostics.DebuggerNonUserCodeAttribute]
-    public void MergeFrom(pb.CodedInputStream input) {
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
+    public void MergeFrom(pb::CodedInputStream input) {
       uint tag;
       while ((tag = input.ReadTag()) != 0) {
         switch(tag) {
           default:
-              //04 _unknownFields = Google.Protobuf.UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
-                        break;
+            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+            break;
           case 10: {
             Cmd = input.ReadString();
             break;
           }
-          case 16: {
-            TaskId = input.ReadInt32();
+          case 18: {
+            TaskId = input.ReadString();
             break;
           }
           case 26: {

+ 225 - 0
Dispatcher/NettyClient/proto/MessageProto.cs-bak

@@ -0,0 +1,225 @@
+// <auto-generated>
+//     Generated by the protocol buffer compiler.  DO NOT EDIT!
+//     source: MessageProto.proto
+// </auto-generated>
+#pragma warning disable 1591, 0612, 3021
+#region Designer generated code
+
+using pb = Google.Protobuf;
+using pbr = Google.Protobuf.Reflection;
+namespace NettyClient.proto
+{
+
+    /// <summary>Holder for reflection information generated from MessageProto.proto</summary>
+    public static partial class MessageProtoReflection {
+
+    #region Descriptor
+    /// <summary>File descriptor for MessageProto.proto</summary>
+    public static pbr.FileDescriptor Descriptor {
+      get { return descriptor; }
+    }
+    private static pbr.FileDescriptor descriptor;
+
+    static MessageProtoReflection() {
+      byte[] descriptorData = System.Convert.FromBase64String(
+          string.Concat(
+            "ChJNZXNzYWdlUHJvdG8ucHJvdG8SEmNuLnNhZ2FjbG91ZC5wcm90byI3CgdN",
+            "ZXNzYWdlEgsKA2NtZBgBIAEoCRIOCgZ0YXNrSWQYAiABKAUSDwoHY29udGVu",
+            "dBgDIAEoCUIQQgxNZXNzYWdlUHJvdG9IAWIGcHJvdG8z"));
+      descriptor = pbr.FileDescriptor.FromGeneratedCode(descriptorData,
+          new pbr.FileDescriptor[] { },
+          new pbr.GeneratedClrTypeInfo(null, new pbr.GeneratedClrTypeInfo[] {
+            new pbr.GeneratedClrTypeInfo(typeof(Message), Message.Parser, new[]{ "Cmd", "TaskId", "Content" }, null, null, null)
+          }));
+    }
+    #endregion
+
+  }
+  #region Messages
+  public sealed partial class Message : pb.IMessage<Message> {
+    private static readonly pb.MessageParser<Message> _parser = new pb.MessageParser<Message>(() => new Message());
+     //04 private pb.UnknownFieldSet _unknownFields;
+    [System.Diagnostics.DebuggerNonUserCodeAttribute]
+    public static pb.MessageParser<Message> Parser { get { return _parser; } }
+
+    [System.Diagnostics.DebuggerNonUserCodeAttribute]
+    public static pbr.MessageDescriptor Descriptor {
+      get { return MessageProtoReflection.Descriptor.MessageTypes[0]; }
+    }
+
+    [System.Diagnostics.DebuggerNonUserCodeAttribute]
+    pbr.MessageDescriptor pb.IMessage.Descriptor {
+      get { return Descriptor; }
+    }
+
+    [System.Diagnostics.DebuggerNonUserCodeAttribute]
+    public Message() {
+      OnConstruction();
+    }
+
+    partial void OnConstruction();
+
+    [System.Diagnostics.DebuggerNonUserCodeAttribute]
+    public Message(Message other) : this() {
+      cmd_ = other.cmd_;
+      taskId_ = other.taskId_;
+      content_ = other.content_;
+        //04  _unknownFields = pb.UnknownFieldSet.Clone(other._unknownFields);
+        }
+
+        [System.Diagnostics.DebuggerNonUserCodeAttribute]
+    public Message Clone() {
+      return new Message(this);
+    }
+
+    /// <summary>Field number for the "cmd" field.</summary>
+    public const int CmdFieldNumber = 1;
+    private string cmd_ = "";
+    [System.Diagnostics.DebuggerNonUserCodeAttribute]
+    public string Cmd {
+      get { return cmd_; }
+      set {
+        cmd_ = pb.ProtoPreconditions.CheckNotNull(value, "value");
+      }
+    }
+
+    /// <summary>Field number for the "taskId" field.</summary>
+    public const int TaskIdFieldNumber = 2;
+    private int taskId_;
+    [System.Diagnostics.DebuggerNonUserCodeAttribute]
+    public int TaskId {
+      get { return taskId_; }
+      set {
+        taskId_ = value;
+      }
+    }
+
+    /// <summary>Field number for the "content" field.</summary>
+    public const int ContentFieldNumber = 3;
+    private string content_ = "";
+    [System.Diagnostics.DebuggerNonUserCodeAttribute]
+    public string Content {
+      get { return content_; }
+      set {
+        content_ = pb.ProtoPreconditions.CheckNotNull(value, "value");
+      }
+    }
+
+    [System.Diagnostics.DebuggerNonUserCodeAttribute]
+    public override bool Equals(object other) {
+      return Equals(other as Message);
+    }
+
+    [System.Diagnostics.DebuggerNonUserCodeAttribute]
+    public bool Equals(Message other) {
+      if (ReferenceEquals(other, null)) {
+        return false;
+      }
+      if (ReferenceEquals(other, this)) {
+        return true;
+      }
+      if (Cmd != other.Cmd) return false;
+      if (TaskId != other.TaskId) return false;
+      if (Content != other.Content) return false;
+        //04  return Equals(_unknownFields, other._unknownFields);
+            return true;
+    }
+
+        [System.Diagnostics.DebuggerNonUserCodeAttribute]
+    public override int GetHashCode() {
+      int hash = 1;
+      if (Cmd.Length != 0) hash ^= Cmd.GetHashCode();
+      if (TaskId != 0) hash ^= TaskId.GetHashCode();
+      if (Content.Length != 0) hash ^= Content.GetHashCode();
+            //04   if (_unknownFields != null) {hash ^= _unknownFields.GetHashCode();}
+            return hash;
+    }
+
+    [System.Diagnostics.DebuggerNonUserCodeAttribute]
+    public override string ToString() {
+      return pb.JsonFormatter.ToDiagnosticString(this);
+    }
+
+    [System.Diagnostics.DebuggerNonUserCodeAttribute]
+    public void WriteTo(pb.CodedOutputStream output) {
+      if (Cmd.Length != 0) {
+        output.WriteRawTag(10);
+        output.WriteString(Cmd);
+      }
+      if (TaskId != 0) {
+        output.WriteRawTag(16);
+        output.WriteInt32(TaskId);
+      }
+      if (Content.Length != 0) {
+        output.WriteRawTag(26);
+        output.WriteString(Content);
+      }
+
+        //04    if (_unknownFields != null){_unknownFields.WriteTo(output);}
+        }
+
+        [System.Diagnostics.DebuggerNonUserCodeAttribute]
+    public int CalculateSize() {
+      int size = 0;
+      if (Cmd.Length != 0) {
+        size += 1 + pb.CodedOutputStream.ComputeStringSize(Cmd);
+      }
+      if (TaskId != 0) {
+        size += 1 + pb.CodedOutputStream.ComputeInt32Size(TaskId);
+      }
+      if (Content.Length != 0) {
+        size += 1 + pb.CodedOutputStream.ComputeStringSize(Content);
+      }
+
+            //04    if (_unknownFields != null){size += _unknownFields.CalculateSize();}
+            return size;
+    }
+
+    [System.Diagnostics.DebuggerNonUserCodeAttribute]
+    public void MergeFrom(Message other) {
+      if (other == null) {
+        return;
+      }
+      if (other.Cmd.Length != 0) {
+        Cmd = other.Cmd;
+      }
+      if (other.TaskId != 0) {
+        TaskId = other.TaskId;
+      }
+      if (other.Content.Length != 0) {
+        Content = other.Content;
+      }
+        //04  _unknownFields = pb.UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
+        }
+
+        [System.Diagnostics.DebuggerNonUserCodeAttribute]
+    public void MergeFrom(pb.CodedInputStream input) {
+      uint tag;
+      while ((tag = input.ReadTag()) != 0) {
+        switch(tag) {
+          default:
+              //04 _unknownFields = Google.Protobuf.UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
+                        break;
+          case 10: {
+            Cmd = input.ReadString();
+            break;
+          }
+          case 16: {
+            TaskId = input.ReadInt32();
+            break;
+          }
+          case 26: {
+            Content = input.ReadString();
+            break;
+          }
+        }
+      }
+    }
+
+  }
+
+  #endregion
+
+}
+
+#endregion Designer generated code

+ 0 - 230
Dispatcher/NettyClient/proto/MessageProtoStr.cs

@@ -1,230 +0,0 @@
-// <auto-generated>
-//     Generated by the protocol buffer compiler.  DO NOT EDIT!
-//     source: MessageProto.proto
-// </auto-generated>
-#pragma warning disable 1591, 0612, 3021
-#region Designer generated code
-
-using pb = global::Google.Protobuf;
-using pbc = global::Google.Protobuf.Collections;
-using pbr = global::Google.Protobuf.Reflection;
-using scg = global::System.Collections.Generic;
-namespace Google.Protobuf.WellKnownTypes {
-
-  /// <summary>Holder for reflection information generated from MessageProto.proto</summary>
-  public static partial class MessageProtoReflection {
-
-    #region Descriptor
-    /// <summary>File descriptor for MessageProto.proto</summary>
-    public static pbr::FileDescriptor Descriptor {
-      get { return descriptor; }
-    }
-    private static pbr::FileDescriptor descriptor;
-
-    static MessageProtoReflection() {
-      byte[] descriptorData = global::System.Convert.FromBase64String(
-          string.Concat(
-            "ChJNZXNzYWdlUHJvdG8ucHJvdG8SEmNuLnNhZ2FjbG91ZC5wcm90byI3CgdN",
-            "ZXNzYWdlEgsKA2NtZBgBIAEoCRIOCgZ0YXNrSWQYAiABKAkSDwoHY29udGVu",
-            "dBgDIAEoCUI0Qg9NZXNzYWdlUHJvdG9TdHJIAaoCHkdvb2dsZS5Qcm90b2J1",
-            "Zi5XZWxsS25vd25UeXBlc2IGcHJvdG8z"));
-      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
-          new pbr::FileDescriptor[] { },
-          new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
-            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKnownTypes.Message), global::Google.Protobuf.WellKnownTypes.Message.Parser, new[]{ "Cmd", "TaskId", "Content" }, null, null, null, null)
-          }));
-    }
-    #endregion
-
-  }
-  #region Messages
-  public sealed partial class Message : pb::IMessage<Message> {
-    private static readonly pb::MessageParser<Message> _parser = new pb::MessageParser<Message>(() => new Message());
-    private pb::UnknownFieldSet _unknownFields;
-    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
-    public static pb::MessageParser<Message> Parser { get { return _parser; } }
-
-    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
-    public static pbr::MessageDescriptor Descriptor {
-      get { return global::Google.Protobuf.WellKnownTypes.MessageProtoReflection.Descriptor.MessageTypes[0]; }
-    }
-
-    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
-    pbr::MessageDescriptor pb::IMessage.Descriptor {
-      get { return Descriptor; }
-    }
-
-    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
-    public Message() {
-      OnConstruction();
-    }
-
-    partial void OnConstruction();
-
-    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
-    public Message(Message other) : this() {
-      cmd_ = other.cmd_;
-      taskId_ = other.taskId_;
-      content_ = other.content_;
-      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
-    }
-
-    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
-    public Message Clone() {
-      return new Message(this);
-    }
-
-    /// <summary>Field number for the "cmd" field.</summary>
-    public const int CmdFieldNumber = 1;
-    private string cmd_ = "";
-    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
-    public string Cmd {
-      get { return cmd_; }
-      set {
-        cmd_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
-      }
-    }
-
-    /// <summary>Field number for the "taskId" field.</summary>
-    public const int TaskIdFieldNumber = 2;
-    private string taskId_ = "";
-    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
-    public string TaskId {
-      get { return taskId_; }
-      set {
-        taskId_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
-      }
-    }
-
-    /// <summary>Field number for the "content" field.</summary>
-    public const int ContentFieldNumber = 3;
-    private string content_ = "";
-    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
-    public string Content {
-      get { return content_; }
-      set {
-        content_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
-      }
-    }
-
-    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
-    public override bool Equals(object other) {
-      return Equals(other as Message);
-    }
-
-    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
-    public bool Equals(Message other) {
-      if (ReferenceEquals(other, null)) {
-        return false;
-      }
-      if (ReferenceEquals(other, this)) {
-        return true;
-      }
-      if (Cmd != other.Cmd) return false;
-      if (TaskId != other.TaskId) return false;
-      if (Content != other.Content) return false;
-      return Equals(_unknownFields, other._unknownFields);
-    }
-
-    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
-    public override int GetHashCode() {
-      int hash = 1;
-      if (Cmd.Length != 0) hash ^= Cmd.GetHashCode();
-      if (TaskId.Length != 0) hash ^= TaskId.GetHashCode();
-      if (Content.Length != 0) hash ^= Content.GetHashCode();
-      if (_unknownFields != null) {
-        hash ^= _unknownFields.GetHashCode();
-      }
-      return hash;
-    }
-
-    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
-    public override string ToString() {
-      return pb::JsonFormatter.ToDiagnosticString(this);
-    }
-
-    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
-    public void WriteTo(pb::CodedOutputStream output) {
-      if (Cmd.Length != 0) {
-        output.WriteRawTag(10);
-        output.WriteString(Cmd);
-      }
-      if (TaskId.Length != 0) {
-        output.WriteRawTag(18);
-        output.WriteString(TaskId);
-      }
-      if (Content.Length != 0) {
-        output.WriteRawTag(26);
-        output.WriteString(Content);
-      }
-      if (_unknownFields != null) {
-        _unknownFields.WriteTo(output);
-      }
-    }
-
-    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
-    public int CalculateSize() {
-      int size = 0;
-      if (Cmd.Length != 0) {
-        size += 1 + pb::CodedOutputStream.ComputeStringSize(Cmd);
-      }
-      if (TaskId.Length != 0) {
-        size += 1 + pb::CodedOutputStream.ComputeStringSize(TaskId);
-      }
-      if (Content.Length != 0) {
-        size += 1 + pb::CodedOutputStream.ComputeStringSize(Content);
-      }
-      if (_unknownFields != null) {
-        size += _unknownFields.CalculateSize();
-      }
-      return size;
-    }
-
-    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
-    public void MergeFrom(Message other) {
-      if (other == null) {
-        return;
-      }
-      if (other.Cmd.Length != 0) {
-        Cmd = other.Cmd;
-      }
-      if (other.TaskId.Length != 0) {
-        TaskId = other.TaskId;
-      }
-      if (other.Content.Length != 0) {
-        Content = other.Content;
-      }
-      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
-    }
-
-    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
-    public void MergeFrom(pb::CodedInputStream input) {
-      uint tag;
-      while ((tag = input.ReadTag()) != 0) {
-        switch(tag) {
-          default:
-            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
-            break;
-          case 10: {
-            Cmd = input.ReadString();
-            break;
-          }
-          case 18: {
-            TaskId = input.ReadString();
-            break;
-          }
-          case 26: {
-            Content = input.ReadString();
-            break;
-          }
-        }
-      }
-    }
-
-  }
-
-  #endregion
-
-}
-
-#endregion Designer generated code

+ 7 - 7
Dispatcher/NettyClient/proto/MessageUtil.cs

@@ -8,13 +8,13 @@ namespace NettyClient.proto
 {
     public class MessageUtil
     {
-        public static Message generateMessage(string cmd, int taskId, string content) {
-            Message msg = new Message();
-            msg.Cmd = cmd;
-            msg.TaskId = taskId;
-            msg.Content = content;
-            return msg;
-        }
+        //public static Message generateMessage(string cmd, int taskId, string content) {
+        //    Message msg = new Message();
+        //    msg.Cmd = cmd;
+        //    msg.TaskId = taskId;
+        //    msg.Content = content;
+        //    return msg;
+        //}
 
         public static Google.Protobuf.WellKnownTypes.Message generateMessageStr(string cmd, string taskId, string content)
         {