Beispiel #1
0
        static void Main(string[] args)
        {
            var getQueryResponses = new List <IApiGetResponse>
            {
                new AllMembersQuery(), new SingleMemberQuery()
            };

            var deleteQueryResponses = new List <IApiDeleteResponse>
            {
                new DeleteMemberResponse()
            };

            var postQueryResponses = new List <IApiPostResponse>
            {
                new CreateNewMemberResponse()
            };

            var patchQueryResponses = new List <IApiPatchResponse>
            {
                new PatchResponse()
            };



            var apiGetResponseFactory    = new ApiGetResponseFactory(getQueryResponses);
            var apiDeleteResponseFactory = new ApiDeleteResponseFactory(deleteQueryResponses);
            var apiPostResponseFactory   = new ApiPostResponseFactory(postQueryResponses);
            var apiPatchResponseFactory  = new ApiPatchResponseFactory(patchQueryResponses);

            var frameworkLessApp = new FrameworklessApi(apiGetResponseFactory, apiDeleteResponseFactory,
                                                        apiPostResponseFactory, apiPatchResponseFactory);

            frameworkLessApp.Listen();
        }
Beispiel #2
0
 public FrameworklessApi(ApiGetResponseFactory apiGetResponseFactory,
                         ApiDeleteResponseFactory apiDeleteResponseFactory, ApiPostResponseFactory apiPostResponseFactory,
                         ApiPatchResponseFactory apiPatchResponseFactory)
 {
     _apiGetResponseFactory    = apiGetResponseFactory;
     _apiDeleteResponseFactory = apiDeleteResponseFactory;
     _apiPostResponseFactory   = apiPostResponseFactory;
     _apiPatchResponseFactory  = apiPatchResponseFactory;
 }