Ejemplo n.º 1
0
        /// <summary>
        /// Web method that is called when synchronization data is send to <b>ISynchronizationService</b>.
        /// </summary>
        /// <param name="data">The method params.</param>
        /// <returns>Generic response.</returns>
        public Message SendData(Message data)
        {
            RoboFramework.Tools.RandomLogHelper.GetLog().Debug("SynchronizationService:SendData(Message data)");
            DataContractSerializer serializer = new DataContractSerializer(requestHandler.GetDataReceivedParameterType());

            using (XmlDictionaryReader reader = data.GetReaderAtBodyContents())
                using (data)
                {
                    object objData = serializer.ReadObject(reader);
                    object result  = requestHandler.DataReceived(objData);
                    return(Message.CreateMessage(data.Version, "http://tempuri.org/ISynchronizationService/SendDataResponse", result));
                }
        }