예제 #1
0
        public IResourceFacade GetResource(string featureName, string resourceName)
        {
            if (_service == null)
            {
                return(null);
            }

            IResourceFacade resource = null;

            var feature = _service.GetFeature(featureName);

            var udapiResource = feature?.GetResource(resourceName);

            if (udapiResource != null)
            {
                resource = new UdapiResourceFacade(udapiResource, featureName, _reconnectStrategy, _settings.EchoDelay, _settings.EchoInterval);
            }

            return(resource);
        }
        public IResourceFacade GetResource(string featureName, string resourceName)
        {
            if (_service == null)
                return null;

            IResourceFacade resource = null;

            var feature = _service.GetFeature(featureName);

            if (feature != null)
            {
                var udapiResource = feature.GetResource(resourceName);

                if (udapiResource != null)
                {
                    resource = new UdapiResourceFacade(udapiResource, featureName, _reconnectStrategy, _settings.EchoDelay, _settings.EchoInterval);
                }
            }

            return resource;
        }