Example #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);
        }
Example #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));
        }
Example #3
0
        public static List <IServiceInfo> GetServiceInfos(this IConfiguration config, Type infoType)
        {
            CloudFoundryServiceInfoCreator factory = CloudFoundryServiceInfoCreator.Instance(config);

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

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

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