ServiceClientGenerator.GeneratorDriver.GetRequestMarshaller C# (CSharp) Méthode

GetRequestMarshaller() public méthode

Sets the marshaller of the generator based on the service type
public GetRequestMarshaller ( BaseRequestMarshaller &marshaller, bool &normalizeMarshallers ) : void
marshaller BaseRequestMarshaller The marshaller to be set
normalizeMarshallers bool If the service type is a type of json then normalizeMarshallers is set to true, false otherwise
Résultat void
        void GetRequestMarshaller(out BaseRequestMarshaller marshaller, out bool normalizeMarshallers)
        {
            normalizeMarshallers = false;
            switch (this.Configuration.ServiceModel.Type)
            {
                case ServiceType.Rest_Json:
                case ServiceType.Json:
                    marshaller = new JsonRPCRequestMarshaller();
                    normalizeMarshallers = true;
                    break;
                case ServiceType.Query:
                    marshaller = new AWSQueryRequestMarshaller();
                    break;
                case ServiceType.Rest_Xml:
                    marshaller = new RestXmlRequestMarshaller();
                    break;
                default:
                    throw new Exception("No request marshaller for service type: " + this.Configuration.ServiceModel.Type);
            }
        }