Ejemplo n.º 1
0
        public static GetLicenseResponse Unmarshall(UnmarshallerContext context)
        {
            GetLicenseResponse getLicenseResponse = new GetLicenseResponse();

            getLicenseResponse.HttpResponse = context.HttpResponse;
            getLicenseResponse.RequestId    = context.StringValue("GetLicense.RequestId");
            getLicenseResponse.License      = context.StringValue("GetLicense.License");

            return(getLicenseResponse);
        }
Ejemplo n.º 2
0
        public bool HasVideoPlayerPermission()
        {
            GetLicenseRequest request = new GetLicenseRequest
            {
                ClientId = _connectionService.ClientId
            };

            GetLicenseResponse response = _connectionService.Execute <GetLicenseResponse>(request);

            return(response.LicensePermissions.UgcsVideoPlayer);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Unmarshaller the response from the service to the response class.
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
        {
            GetLicenseResponse response = new GetLicenseResponse();

            context.Read();
            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("License", targetDepth))
                {
                    var unmarshaller = LicenseUnmarshaller.Instance;
                    response.License = unmarshaller.Unmarshall(context);
                    continue;
                }
            }

            return(response);
        }