Exemple #1
0
        private static void WriteCentralTransitiveDependencyGroup(IObjectWriter writer, IList <CentralTransitiveDependencyGroup> centralTransitiveDependencyGroups)
        {
            writer.WriteObjectStart();

            foreach (var centralTransitiveDepGroup in centralTransitiveDependencyGroups.OrderBy(ptdg => ptdg.FrameworkName))
            {
                PackageSpecWriter.SetCentralTransitveDependencyGroup(writer, centralTransitiveDepGroup.FrameworkName, centralTransitiveDepGroup.TransitiveDependencies);
            }

            writer.WriteObjectEnd();
        }
Exemple #2
0
        private static JToken WriteCentralTransitiveDependencyGroup(IList <CentralTransitiveDependencyGroup> centralTransitiveDependencyGroups)
        {
            using (var jsonWriter = new JTokenWriter())
                using (var writer = new JsonObjectWriter(jsonWriter))
                {
                    writer.WriteObjectStart();

                    foreach (var centralTransitiveDepGroup in centralTransitiveDependencyGroups.OrderBy(ptdg => ptdg.FrameworkName))
                    {
                        PackageSpecWriter.SetCentralTransitveDependencyGroup(writer, centralTransitiveDepGroup.FrameworkName, centralTransitiveDepGroup.TransitiveDependencies);
                    }

                    writer.WriteObjectEnd();
                    return(jsonWriter.Token);
                }
        }