Exemplo n.º 1
0
        public static CloudFoundryServiceInfoCreator Instance(IConfiguration config)
        {
            if (config == null)
            {
                throw new ArgumentNullException(nameof(config));
            }

            if (config == _config)
            {
                return(_me);
            }

            lock (_lock)
            {
                if (config == _config)
                {
                    return(_me);
                }

                _me = new CloudFoundryServiceInfoCreator(config);
            }
            return(_me);
        }
Exemplo n.º 2
0
        public static SI GetServiceInfo <SI>(this IConfiguration config, string id) where SI : class
        {
            CloudFoundryServiceInfoCreator factory = CloudFoundryServiceInfoCreator.Instance(config);

            return(factory.GetServiceInfo <SI>(id));
        }
Exemplo n.º 3
0
        public static List <IServiceInfo> GetServiceInfos(this IConfiguration config, Type infoType)
        {
            CloudFoundryServiceInfoCreator factory = CloudFoundryServiceInfoCreator.Instance(config);

            return(factory.GetServiceInfos(infoType));
        }
Exemplo n.º 4
0
        public static IServiceInfo GetServiceInfo(this IConfiguration config, string id)
        {
            CloudFoundryServiceInfoCreator factory = CloudFoundryServiceInfoCreator.Instance(config);

            return(factory.GetServiceInfo(id));
        }
Exemplo n.º 5
0
        public static List <SI> GetServiceInfos <SI>(this IConfiguration config) where SI : class
        {
            CloudFoundryServiceInfoCreator factory = CloudFoundryServiceInfoCreator.Instance(config);

            return(factory.GetServiceInfos <SI>());
        }