Beispiel #1
0
        /// <nodoc/>
        public MSBuildGraphBuilderArguments(
            IReadOnlyCollection <string> projectsToParse,
            string outputPath,
            GlobalProperties globalProperties,
            IReadOnlyCollection <string> mSBuildSearchLocations,
            IReadOnlyCollection <string> entryPointTargets,
            IReadOnlyCollection <GlobalProperties> requestedQualifiers,
            bool allowProjectsWithoutTargetProtocol,
            bool msBuildRuntimeIsDotNetCore)
        {
            Contract.Requires(projectsToParse?.Count > 0);
            Contract.Requires(!string.IsNullOrEmpty(outputPath));
            Contract.Requires(globalProperties != null);
            Contract.Requires(mSBuildSearchLocations != null);
            Contract.Requires(entryPointTargets != null);
            Contract.Requires(requestedQualifiers?.Count > 0);

            ProjectsToParse                    = projectsToParse;
            OutputPath                         = outputPath;
            GlobalProperties                   = globalProperties;
            MSBuildSearchLocations             = mSBuildSearchLocations;
            EntryPointTargets                  = entryPointTargets;
            RequestedQualifiers                = requestedQualifiers;
            AllowProjectsWithoutTargetProtocol = allowProjectsWithoutTargetProtocol;
            MsBuildRuntimeIsDotNetCore         = msBuildRuntimeIsDotNetCore;
        }
        /// <nodoc/>
        public MSBuildGraphBuilderArguments(
            string enlistmentRoot,
            IReadOnlyCollection <string> projectsToParse,
            string outputPath,
            GlobalProperties globalProperties,
            IReadOnlyCollection <string> mSBuildSearchLocations,
            IReadOnlyCollection <string> entryPointTargets,
            IReadOnlyCollection <GlobalProperties> requestedQualifiers)
        {
            Contract.Requires(!string.IsNullOrEmpty(enlistmentRoot));
            Contract.Requires(projectsToParse?.Count > 0);
            Contract.Requires(!string.IsNullOrEmpty(outputPath));
            Contract.Requires(globalProperties != null);
            Contract.Requires(mSBuildSearchLocations != null);
            Contract.Requires(entryPointTargets != null);
            Contract.Requires(requestedQualifiers?.Count > 0);

            EnlistmentRoot         = enlistmentRoot;
            ProjectsToParse        = projectsToParse;
            OutputPath             = outputPath;
            GlobalProperties       = globalProperties;
            MSBuildSearchLocations = mSBuildSearchLocations;
            EntryPointTargets      = entryPointTargets;
            RequestedQualifiers    = requestedQualifiers;
        }
Beispiel #3
0
        /// <inheritdoc/>
        public override string ToString()
        {
            return
                ($@"Project entry points: [{string.Join(", ", ProjectsToParse)}]
Serialized graph path: {OutputPath}
Global properties: {string.Join(" ", GlobalProperties.Select(kvp => $"[{kvp.Key}]={kvp.Value}"))}
Search locations: {string.Join(" ", MSBuildSearchLocations)}
Requested qualifiers: {string.Join(" ", RequestedQualifiers.Select(qualifier => string.Join(";", qualifier.Select(kvp => $"[{kvp.Key}]={kvp.Value}"))))}
Allow projects without target protocol: {AllowProjectsWithoutTargetProtocol}");
        }
        /// <inheritdoc/>
        public override string ToString()
        {
            return
                ($@"Enlistment root: {EnlistmentRoot}
Project entry points: [{string.Join(", ", ProjectsToParse)}]
Serialized graph path: {OutputPath}
Global properties: {string.Join(" ", GlobalProperties.Select(kvp => $"[{kvp.Key}]={kvp.Value}"))}
Search locations: {string.Join(" ", MSBuildSearchLocations)}
Requested qualifiers: {string.Join(" ", RequestedQualifiers.Select(qualifier => string.Join(";", qualifier.Select(kvp => $"[{kvp.Key}]={kvp.Value}"))))}");
        }