Execute() 공개 메소드

public Execute ( ) : string
리턴 string
예제 #1
0
        void Generate(ServiceModel model, string operationName, out string requestJson, out string responseJson)
        {
            var operation = model.Operations.First(x => x.Name == operationName);
            JsonSampleGenerator generator = new JsonSampleGenerator(model, operation.RequestStructure);

            requestJson = generator.Execute();

            generator    = new JsonSampleGenerator(model, operation.ResponseStructure);
            responseJson = generator.Execute();
        }
        void Generate(ServiceModel model, string operationName, out string requestJson, out string responseJson)
        {
            var operation = model.Operations.First(x => x.Name == operationName);

            if (operation.RequestStructure == null)
            {
                requestJson = null;
            }
            else
            {
                var requestGenerator = new JsonSampleGenerator(model, operation.RequestStructure);
                requestJson = requestGenerator.Execute();
            }

            if (operation.ResponseStructure == null)
            {
                responseJson = null;
            }
            else
            {
                var responseGenerator = new JsonSampleGenerator(model, operation.ResponseStructure);
                responseJson = responseGenerator.Execute();
            }
        }
        void Generate(ServiceModel model, string operationName, out string requestJson, out string responseJson)
        {
            var operation = model.Operations.First(x => x.Name == operationName);
            JsonSampleGenerator generator = new JsonSampleGenerator(model, operation.RequestStructure);
            requestJson = generator.Execute();

            generator = new JsonSampleGenerator(model, operation.ResponseStructure);
            responseJson = generator.Execute();
        }