Ejemplo n.º 1
0
        public static Task <RemoteDesktopChannel> CreateScreenChannel(ComponentOptions captureOptions, ComponentOptions encoderOptions,
                                                                      ITargetedRestClient restClient)
        {
            var requestBuilder = CreateRequest(HttpVerb.Get, "screen");

            requestBuilder.Message.Headers.Add("capture", captureOptions.ToString());
            requestBuilder.Message.Headers.AcceptEncoding.Add(new StringWithQualityHeaderValue(encoderOptions.ToString(), 1));

            return(requestBuilder.CreateChannel <RemoteDesktopChannel>(restClient, CancellationToken.None));
        }
Ejemplo n.º 2
0
        public void TestToString(ComponentOptions options, string expectedToString)
        {
            var toString = options.ToString();

            Assert.Equal(expectedToString, toString);
        }