Пример #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));
 }