diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2009-06-25 19:51:02 -0700 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2009-06-25 19:51:02 -0700 |
commit | 3b2fe4819cf449d1ab88178d055239c64b3cfd5e (patch) | |
tree | e191391cc71af22a854a06fee0079dbb74405752 /src/DotNetOpenAuth.BuildTasks/SetEnvironmentVariable.cs | |
parent | 97e3fc44a6911289baf3435febc0b003e56ad4e8 (diff) | |
parent | f3ce247dfaa965011c7f8417d00e0fa3dfad4a35 (diff) | |
download | DotNetOpenAuth-3b2fe4819cf449d1ab88178d055239c64b3cfd5e.zip DotNetOpenAuth-3b2fe4819cf449d1ab88178d055239c64b3cfd5e.tar.gz DotNetOpenAuth-3b2fe4819cf449d1ab88178d055239c64b3cfd5e.tar.bz2 |
Merge branch 'master' into contracts
Conflicts:
src/DotNetOpenAuth.vsmdi
src/DotNetOpenAuth/Configuration/TypeConfigurationCollection.cs
src/DotNetOpenAuth/Configuration/TypeConfigurationElement.cs
src/DotNetOpenAuth/DotNetOpenAuth.csproj
src/DotNetOpenAuth/Messaging/HttpRequestInfo.cs
src/DotNetOpenAuth/Messaging/Reflection/MessagePart.cs
src/DotNetOpenAuth/Messaging/Reflection/ValueMapping.cs
src/DotNetOpenAuth/OAuth/ChannelElements/OAuthChannel.cs
src/DotNetOpenAuth/OAuth/ConsumerBase.cs
src/DotNetOpenAuth/OAuth/Messages/MessageBase.cs
src/DotNetOpenAuth/OAuth/Messages/UnauthorizedTokenResponse.cs
src/DotNetOpenAuth/OAuth/ServiceProvider.cs
src/DotNetOpenAuth/OpenId/Protocol.cs
src/DotNetOpenAuth/OpenId/Provider/AutoResponsiveRequest.cs
src/DotNetOpenAuth/OpenId/Provider/HostProcessedRequest.cs
src/DotNetOpenAuth/OpenId/Provider/IHostProcessedRequest.cs
src/DotNetOpenAuth/OpenId/Provider/Request.cs
src/DotNetOpenAuth/OpenId/RelyingParty/OpenIdRelyingParty.cs
src/DotNetOpenAuth/OpenId/RelyingParty/ServiceEndpoint.cs
Diffstat (limited to 'src/DotNetOpenAuth.BuildTasks/SetEnvironmentVariable.cs')
-rw-r--r-- | src/DotNetOpenAuth.BuildTasks/SetEnvironmentVariable.cs | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/DotNetOpenAuth.BuildTasks/SetEnvironmentVariable.cs b/src/DotNetOpenAuth.BuildTasks/SetEnvironmentVariable.cs new file mode 100644 index 0000000..2de5976 --- /dev/null +++ b/src/DotNetOpenAuth.BuildTasks/SetEnvironmentVariable.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Text; +using Microsoft.Build.Utilities; +using Microsoft.Build.Framework; + +namespace DotNetOpenAuth.BuildTasks { + public class SetEnvironmentVariable : Task { + public SetEnvironmentVariable() { + Scope = EnvironmentVariableTarget.Process; + } + + /// <summary> + /// The name of the environment variable to set or clear. + /// </summary> + [Required] + public string Name { get; set; } + /// <summary> + /// The value of the environment variable, or the empty string to clear it. + /// </summary> + [Required] + public string Value { get; set; } + /// <summary> + /// The target environment for the variable. Machine, User, or Process. + /// </summary> + public EnvironmentVariableTarget Scope { get; set; } + + public override bool Execute() { + Environment.SetEnvironmentVariable(Name, Value, Scope); + return true; + } + } +} |