Exemple #1
0
 /// <summary>
 /// Creates a generic secondary response.
 /// </summary>
 /// <param name="responseCreator">The generic-response creator. Executes with the data-access cache enabled.</param>
 /// <param name="memoryCachingSetup">The memory-caching setup object for the response. Pass null if you do not want to use EWL's memory cache.</param>
 public SecondaryResponse(Func <EwfResponse> responseCreator, ResponseMemoryCachingSetup memoryCachingSetup = null)
 {
     fullResponseGetter =
         () =>
         memoryCachingSetup != null
                                 ? FullResponse.GetFromCache(memoryCachingSetup.CacheKey, memoryCachingSetup.LastModificationDateAndTime, () => responseCreator().CreateFullResponse())
         : responseCreator().CreateFullResponse();
 }
 /// <summary>
 /// Creates a generic secondary response.
 /// </summary>
 /// <param name="responseCreator">The generic-response creator. Executes with the data-access cache enabled.</param>
 /// <param name="memoryCachingSetup">The memory-caching setup object for the response. Pass null if you do not want to use EWL's memory cache.</param>
 public SecondaryResponse( Func<EwfResponse> responseCreator, ResponseMemoryCachingSetup memoryCachingSetup = null )
 {
     fullResponseGetter =
         () =>
         memoryCachingSetup != null
             ? FullResponse.GetFromCache( memoryCachingSetup.CacheKey, memoryCachingSetup.LastModificationDateAndTime, () => responseCreator().CreateFullResponse() )
             : responseCreator().CreateFullResponse();
 }