Ejemplo n.º 1
0
        public static void RegisterSampleMessage(string servicePath, string operation, SampleMessage sampleMessage)
        {
            if (servicePath == null || operation == null || sampleMessage == null || sampleMessage.Request == null || sampleMessage.Response == null)
            {
                return;
            }

            Dictionary <string, SampleMessage> operationSampleMessage;

            SampleMessageCache.TryGetValue(servicePath, out operationSampleMessage);
            if (operationSampleMessage == null)
            {
                operationSampleMessage          = new Dictionary <string, SampleMessage>();
                SampleMessageCache[servicePath] = operationSampleMessage;
            }

            operationSampleMessage[operation.Trim().ToLower()] = PopulateSampleMessage(sampleMessage);
        }
Ejemplo n.º 2
0
 protected static SampleMessage PopulateSampleMessage(SampleMessage message)
 {
     return(new SampleMessage(ReflectionUtils.PopulateObject(message.Request), ReflectionUtils.PopulateObject(message.Response)));
 }