diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2010-08-07 14:15:32 -0700 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2010-08-07 14:15:32 -0700 |
commit | d40bbbd127eb1a833e06af14f7dc352e272e2c43 (patch) | |
tree | 6a46408dcc909d31ac1f0230ce2fba4eeb4ae74a /src/DotNetOpenAuth.BuildTasks/SignatureVerification.cs | |
parent | 9940f1a22a8a322a19d1036ab9660f7dd62ddcc1 (diff) | |
parent | b10e1c35117832121a5ea1042f812db2fafb8a9d (diff) | |
download | DotNetOpenAuth-d40bbbd127eb1a833e06af14f7dc352e272e2c43.zip DotNetOpenAuth-d40bbbd127eb1a833e06af14f7dc352e272e2c43.tar.gz DotNetOpenAuth-d40bbbd127eb1a833e06af14f7dc352e272e2c43.tar.bz2 |
Merge branch 'v3.0' into v3.1
Diffstat (limited to 'src/DotNetOpenAuth.BuildTasks/SignatureVerification.cs')
-rw-r--r-- | src/DotNetOpenAuth.BuildTasks/SignatureVerification.cs | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/DotNetOpenAuth.BuildTasks/SignatureVerification.cs b/src/DotNetOpenAuth.BuildTasks/SignatureVerification.cs new file mode 100644 index 0000000..2e69926 --- /dev/null +++ b/src/DotNetOpenAuth.BuildTasks/SignatureVerification.cs @@ -0,0 +1,45 @@ +//----------------------------------------------------------------------- +// <copyright file="SignatureVerification.cs" company="Andrew Arnott"> +// Copyright (c) Andrew Arnott. All rights reserved. +// </copyright> +//----------------------------------------------------------------------- + +namespace DotNetOpenAuth.BuildTasks { + using Microsoft.Build.Utilities; + + public class SignatureVerification : SnToolTask { + /// <summary> + /// Gets or sets a value indicating whether to register the given assembly and public key token + /// for skip verification or clear any pre-existing skip verification entry. + /// </summary> + public bool SkipVerification { get; set; } + + /// <summary> + /// Gets or sets the name of the assembly. + /// </summary> + /// <value>The name of the assembly.</value> + public string AssemblyName { get; set; } + + /// <summary> + /// Gets or sets the public key token. + /// </summary> + /// <value>The public key token.</value> + public string PublicKeyToken { get; set; } + + /// <summary> + /// Generates the command line commands. + /// </summary> + protected override string GenerateCommandLineCommands() { + CommandLineBuilder builder = new CommandLineBuilder(); + builder.AppendSwitch("-q"); + if (this.SkipVerification) { + builder.AppendSwitch("-Vr"); + } else { + builder.AppendSwitch("-Vu"); + } + + builder.AppendFileNameIfNotNull(this.AssemblyName + "," + this.PublicKeyToken); + return builder.ToString(); + } + } +} |