summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.BuildTasks/SignatureVerification.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2010-10-24 15:56:48 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2010-10-24 15:56:48 -0700
commit9dbb9aab73812202648c4e68d60261dd84d6c8e2 (patch)
tree5de139019a7b2f870f84c57cac36c0e489bd1e41 /src/DotNetOpenAuth.BuildTasks/SignatureVerification.cs
parent4b27c330fbfb3a260aa3bd6a9b1232ee3b53deb0 (diff)
parente7ce41355c38b3125729a62920231f274b7a2100 (diff)
downloadDotNetOpenAuth-origin/mono2.zip
DotNetOpenAuth-origin/mono2.tar.gz
DotNetOpenAuth-origin/mono2.tar.bz2
Merge branch 'v3.2' into mono2origin/mono2
Conflicts: src/DotNetOpenAuth/Messaging/HttpRequestInfo.cs
Diffstat (limited to 'src/DotNetOpenAuth.BuildTasks/SignatureVerification.cs')
-rw-r--r--src/DotNetOpenAuth.BuildTasks/SignatureVerification.cs45
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();
+ }
+ }
+}