예제 #1
0
파일: Rules.cs 프로젝트: Arsslensoft/IPDTP
 public Connection(string request, Encoding enc)
 {
     string[] line = PacketBuilder.Spliter.Split(request, 4);
     Method  = line[0];
     PROCESS = line[1];
     if (line[2] == "IMAGE")
     {
         DataType = ConnectionDataType.IMAGE;
     }
     else if (line[2] == "STRING")
     {
         DataType = ConnectionDataType.STRING;
     }
     else if (line[2] == "RESX")
     {
         DataType = ConnectionDataType.RESX;
     }
     else if (line[2] == "VAR")
     {
         DataType = ConnectionDataType.VAR;
     }
     else
     {
         DataType = ConnectionDataType.INFORMATION;
     }
     Content     = line[3];
     RealContent = enc.GetBytes(Content);
 }
예제 #2
0
        public static string RequestBuilder(Process process, ConnectionDataType DataType, string Method, string Content)
        {
            StringBuilder sb = new StringBuilder();

            sb.Append(Method + "\r\n");
            sb.Append(process.ProcessName + ":" + process.Id.ToString() + "\r\n");
            sb.Append(DataType.ToString() + "\r\n");
            sb.Append(Content);

            return(sb.ToString());
        }
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="connectionConfigKey">The database connection configuration key.</param>
 /// <param name="connectionType">The connection type.</param>
 /// <param name="connectionDataType">The connection data type.</param>
 public DataContext(string connectionConfigKey, ConnectionType connectionType, ConnectionDataType connectionDataType) :
     base(connectionConfigKey, connectionType, connectionDataType)
 {
     OnCreated();
 }