Esempio n. 1
0
        /// <summary>
        /// Get service info of a given type when you know the Id
        /// </summary>
        /// <typeparam name="SI">Service info type you're looking for</typeparam>
        /// <param name="config">Configuration to search</param>
        /// <param name="id">Id of service</param>
        /// <returns>Requested implementation of <see cref="IServiceInfo"/></returns>
        public static SI GetServiceInfo <SI>(this IConfiguration config, string id)
            where SI : class
        {
            CloudFoundryServiceInfoCreator factory = CloudFoundryServiceInfoCreator.Instance(config);

            return(factory.GetServiceInfo <SI>(id));
        }
Esempio n. 2
0
        /// <summary>
        /// Get service info when you know the Id
        /// </summary>
        /// <param name="config">Configuration to search</param>
        /// <param name="id">Id of service</param>
        /// <returns>Requested implementation of <see cref="IServiceInfo"/></returns>
        public static IServiceInfo GetServiceInfo(this IConfiguration config, string id)
        {
            CloudFoundryServiceInfoCreator factory = CloudFoundryServiceInfoCreator.Instance(config);

            return(factory.GetServiceInfo(id));
        }