/// <summary>
        /// Gets the currently selected platform.
        /// </summary>
        public override Task <GetSelectedPlatformResponse> GetSelectedPlatform(
            GetSelectedPlatformRequest request, ServerCallContext context)
        {
            SbDebuggerPreconditionCheck();

            // We currently only support one platform, so just return an empty response.  Since
            // for all platform APIs we assume it's the single instance we have created.
            var response = new GetSelectedPlatformResponse();

            return(Task.FromResult(response));
        }
Ejemplo n.º 2
0
        public SbPlatform GetSelectedPlatform()
        {
            var request = new GetSelectedPlatformRequest();

            if (connection.InvokeRpc(() =>
            {
                client.GetSelectedPlatform(request);
            }))
            {
                // Create a new platform without telling the server to create a new one.  Since we
                // only support a single platform on the server, there is no need to identify which
                // platform to call the RPCs on (its assumed).  So just create a default platform
                // and start calling RPCs.
                return(sbPlatformFactory.Create(connection));
            }
            return(null);
        }