protected override async Task <HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
        {
            var responseObject = new PropertiesResource
            {
                SessionId = 10001,
            };

            responseObject.Links.Add(new Link
            {
                Rel  = Link.SessionRel,
                Href = SessionUri
            });
            responseObject.Links.Add(new Link
            {
                Rel  = Link.SelfRel,
                Href = PropertiesUri
            });

            responseObject.Properties["Property1"] = "PropertyValue1";
            responseObject.Properties["Property2"] = "PropertyValue2";

            var response = new HttpResponseMessage(HttpStatusCode.OK)
            {
                Content = new StringContent(JsonConvert.SerializeObject(responseObject),
                                            Encoding.UTF8, "application/json")
            };

            return(response);
        }
Ejemplo n.º 2
0
 public MainViewModel()
 {
     _allResources = new PropertiesResource();
       _cultureName = new List<string>();
       _cultureName.Add("English");
       _cultureName.Add("Français");
       _selectedCultureName = "English";
 }
Ejemplo n.º 3
0
 /// <summary>Constructs a new resource.</summary>
 public PlatformsResource(Google.Apis.Services.IClientService service)
 {
     this.service = service;
     Properties   = new PropertiesResource(service);
 }