public static async Task SerializeToJsonFile(IServiceCollection services, string serviceCollectionDescriptionFilePath)
        {
            using (var serviceProvider = ServiceCollectionInvestigationHelper.GetJsonSerializationServiceProvider())
            {
                var serviceCollectionDescriptionFileSerializer = serviceProvider.GetRequiredService <IServiceCollectionDescriptionFileSerializer>();
                var serviceDescriptorDescriptionConverter      = serviceProvider.GetRequiredService <IServiceDescriptorDescriptionConverter>();

                var descriptions = await serviceDescriptorDescriptionConverter.Convert(services);

                await serviceCollectionDescriptionFileSerializer.Serialize(serviceCollectionDescriptionFilePath, descriptions);
            }
        }
        public static async Task FindServicesIn01MissingFrom02(
            string serviceCollectionDescriptionFilePath01,
            string serviceCollectionDescriptionFilePath02,
            string differencesFilePath)
        {
            using (var serviceProvider = ServiceCollectionInvestigationHelper.GetJsonSerializationServiceProvider())
            {
                var serviceCollectionDescriptionFileSerializer = serviceProvider.GetRequiredService <IServiceCollectionDescriptionFileSerializer>();

                var descriptions01 = await serviceCollectionDescriptionFileSerializer.Deserialize(serviceCollectionDescriptionFilePath01);

                var descriptions02 = await serviceCollectionDescriptionFileSerializer.Deserialize(serviceCollectionDescriptionFilePath02);

                var in01MissingFrom02 = descriptions01.Except(descriptions02, new ServiceDescriptorDescriptionServiceTypeEqualityComparer());

                await serviceCollectionDescriptionFileSerializer.Serialize(differencesFilePath, in01MissingFrom02);
            }
        }
 public static Task SerializeToJsonFile(this IServiceCollection services, string serviceCollectionDescriptionJsonFilePath)
 {
     return(ServiceCollectionInvestigationHelper.SerializeToJsonFile(services, serviceCollectionDescriptionJsonFilePath));
 }
 public static Task Describe(this IServiceCollection services, string serviceCollectionDescriptionFilePath)
 {
     return(ServiceCollectionInvestigationHelper.DescribeServicesToFile(services, serviceCollectionDescriptionFilePath));
 }