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

            if (configuration != _me?.Configuration)
            {
                lock (_lock)
                {
                    if (configuration != _me?.Configuration)
                    {
                        _me = new CloudFoundryServiceInfoCreator(configuration);
                    }
                }
            }

            return(_me);
        }
        public static new 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);
        }