示例#1
0
        /// <summary>
        /// Sets the marshaller of the generator based on the service type
        /// </summary>
        /// <param name="marshaller">The marshaller to be set</param>
        /// <param name="normalizeMarshallers">If the service type is a type of json then normalizeMarshallers is set to true, false otherwise</param>
        void GetRequestMarshaller(out BaseRequestMarshaller marshaller, out bool normalizeMarshallers)
        {
            normalizeMarshallers = false;
            switch (this.config.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.config.ServiceModel.Type);
            }
        }
示例#2
0
 /// <summary>
 /// Sets the marshaller of the generator based on the service type
 /// </summary>
 /// <param name="marshaller">The marshaller to be set</param>
 /// <param name="normalizeMarshallers">If the service type is a type of json then normalizeMarshallers is set to true, false otherwise</param>
 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);
     }
 }