Skip to content

Instantly share code, notes, and snippets.

@JefStat
Created April 22, 2015 18:04
Show Gist options
  • Save JefStat/13ab3917f3ac286f36a8 to your computer and use it in GitHub Desktop.
Save JefStat/13ab3917f3ac286f36a8 to your computer and use it in GitHub Desktop.
<PropertyGroup>
<CommandLine>$([System.Environment]::CommandLine.Trim().ToLower())</CommandLine>
<IsQuietVerbosity>False</IsQuietVerbosity>
<IsMinimalVerbosity>False</IsMinimalVerbosity>
<IsNormalVerbosity>True</IsNormalVerbosity>
<IsDetailedVerbosity>False</IsDetailedVerbosity>
<IsDiagnosticVerbosity>False</IsDiagnosticVerbosity>
</PropertyGroup>
<PropertyGroup Condition="'$(CommandLine.Contains(&quot;/v&quot;))' == 'True'">
<IndexOfLastVerbosityArg>$(CommandLine.LastIndexOf("/v"))</IndexOfLastVerbosityArg>
<IndexOfVerbosityArg>$(CommandLine.IndexOf(":", $(IndexOfLastVerbosityArg)))</IndexOfVerbosityArg>
<IndexOfVerbosityArg>$([MSBuild]::Add($(IndexOfVerbosityArg), 1))</IndexOfVerbosityArg>
<IndexOfEndOfVerbosityArg>$(CommandLine.IndexOf(" ", $(IndexOfVerbosityArg)))</IndexOfEndOfVerbosityArg>
<IndexOfEndOfVerbosityArg Condition="'$(IndexOfEndOfVerbosityArg)' == '-1'">$(CommandLine.Length)</IndexOfEndOfVerbosityArg>
<LengthOfVerbosityArg>$([MSBuild]::Subtract($(IndexOfEndOfVerbosityArg), $(IndexOfVerbosityArg)))</LengthOfVerbosityArg>
<VerbosityLevel>$(CommandLine.Substring($(IndexOfVerbosityArg), $(LengthOfVerbosityArg)).Trim())</VerbosityLevel>
<IsQuietVerbosity>$(VerbosityLevel.StartsWith('q'))</IsQuietVerbosity>
<IsMinimalVerbosity>$(VerbosityLevel.StartsWith('m'))</IsMinimalVerbosity>
<IsNormalVerbosity>$(VerbosityLevel.StartsWith('n'))</IsNormalVerbosity>
<IsDiagnosticVerbosity>$(VerbosityLevel.StartsWith('di'))</IsDiagnosticVerbosity>
<IsDetailedVerbosity Condition="'$(IsDiagnosticVerbosity)' == 'False'">$(VerbosityLevel.StartsWith('d'))</IsDetailedVerbosity>
</PropertyGroup>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment