예제 #1
0
 public static byte[] ConvertRpcParametersToByteArray(Dictionary <string, object> parameters)
 {
     if (parameters == null || parameters.Count < 1)
     {
         throw new ArgumentNullException("parameters");
     }
     return(RpcCommon.ObjectToBytes(parameters));
 }
예제 #2
0
 public RpcParameters(byte[] data)
 {
     if (data == null || data.Length <= 0)
     {
         throw new ArgumentNullException("data");
     }
     this.parameters = RpcCommon.ConvertByteArrayToRpcParameters(data);
 }
예제 #3
0
        public static Dictionary <string, object> ConvertByteArrayToRpcParameters(byte[] data)
        {
            if (data == null || data.Length < 1)
            {
                throw new ArgumentNullException("data");
            }
            Dictionary <string, object> dictionary = RpcCommon.BytesToObject(data) as Dictionary <string, object>;

            if (dictionary == null)
            {
                dictionary = new Dictionary <string, object>();
            }
            return(dictionary);
        }
예제 #4
0
 public byte[] Serialize()
 {
     return(RpcCommon.ConvertRpcParametersToByteArray(this.parameters));
 }