protected SampleEndpointBaseAdvice(ISampleEndpoint advicedSampleEndpoint)
 {
     if (advicedSampleEndpoint == null)
     {
         throw new ArgumentNullException("advicedSampleEndpoint");
     }
     AdvicedSampleEndpoint = advicedSampleEndpoint;
 }
 public SampleEndpointRecordingAdvice(ISampleEndpoint advicedSampleEndpoint, ICallRecorder callRecorder)
     : base(advicedSampleEndpoint)
 {
     if (callRecorder == null)
     {
         throw new ArgumentNullException("callRecorder");
     }
     _callRecorder = callRecorder;
 }
Esempio n. 3
0
        protected void PerformCalls(int numberOfCalls, ISampleEndpoint sampleEndpoint)
        {
            for (var i = 0; i < numberOfCalls; i++)
            {
                var sampleObject = GetSampleObject(i);

                var returnedObject = sampleEndpoint.SampleMethod(sampleObject);

                var callNumber = i;
                Log.Info(x => x("PerformCalls: Call# {0}, returnedObject = {1}", callNumber, JsonCallSerializer.AsJson(returnedObject)));
            }
        }