示例#1
0
        public MetadataServicesClient(SimplTypesScope metadatascope, SemanticsSessionScope semanticSessionScope, ParsedUri serviceUri, bool useWebSockets = false)
        {
            SimplTypesScope[] oodssAndMetadataScope = { metadatascope, DefaultServicesTranslations.Get() };

            _metadataTypeScope = SimplTypesScope.Get("MetadataServicesTranslationScope",
                                                     oodssAndMetadataScope,
                                                     typeof(MetadataRequest),
                                                     typeof(MetadataResponse),
                                                     typeof(SemanticServiceError)
                                                     );

            _serviceBaseUri = serviceUri;

            if (useWebSockets)
            {
                _metadataClient = new WebSocketOODSSClient("127.0.0.1", 2018, _metadataTypeScope, semanticSessionScope);
                _metadataClient.StartAsync();
            }
        }
示例#2
0
 public async Task <bool> StartConnection()
 {
     return(await _client.StartAsync());
 }