Skip to content

Commit

Permalink
Release v3.25.1.0
Browse files Browse the repository at this point in the history
- Added HostingConcurrencyControl for script hosting scenarios
- Added VS2017 shel extensions
  • Loading branch information
oleg-shilo committed Mar 22, 2017
1 parent 16b5704 commit 8af0b64
Show file tree
Hide file tree
Showing 14 changed files with 41 additions and 28 deletions.
Binary file modified Source/Build/CSScriptLibrary.dll
Binary file not shown.
Binary file modified Source/Build/CSScriptLibrary.v3.5.dll
Binary file not shown.
Binary file modified Source/Build/cscs.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion Source/CSSCodeProvider.v.2.0/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@
[assembly: AssemblyKeyFile("")]
[assembly: AssemblyKeyName("")]

[assembly: AssemblyVersion("3.25.0.0")]
[assembly: AssemblyVersion("3.25.1.0")]
2 changes: 1 addition & 1 deletion Source/CSSCodeProvider.v3.5/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@
// Build Number
// Revision
//
[assembly: AssemblyVersion("3.25.0.0")]
[assembly: AssemblyVersion("3.25.1.0")]
2 changes: 1 addition & 1 deletion Source/CSSCodeProvider/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@
[assembly: AssemblyKeyFile("")]
[assembly: AssemblyKeyName("")]

[assembly: AssemblyVersion("3.25.0.0")]
[assembly: AssemblyVersion("3.25.1.0")]
30 changes: 26 additions & 4 deletions Source/CSScriptLibrary/CSScriptLib.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@

namespace CSScriptLibrary
{
/// <summary>
/// Enum for controlling concurrency in script hosting scenarios
/// </summary>
public enum HostingConcurrencyControl
{
/// <summary>
Expand Down Expand Up @@ -1127,11 +1130,10 @@ static public Mutex CreateCompilerLock(string compiledScriptFile, bool optimisti
/// Creates the compiler lock object (<see cref="System.Threading.Mutex"/>). The Mutex object is now initially owned.
/// <para>This object is to be used for the access synchronization to the compiled script file and it can be useful for the
/// tasks like cache purging or explicit script recompilation.</para>
/// <para>The concurrency/lock scope is controlled by <see cref="CSScriptLibrary.CSScript.Ho"/>.
/// <para>The concurrency/lock scope is controlled by <see cref="CSScriptLibrary.CSScript.HostingConcurrencyControl"/>.
/// And it is to be used to control the concurrency scope.</para>
/// </summary>
/// <param name="compiledScriptFile">The script file.</param>
/// Otherwise the operation is thread-safe system wide.</param>
/// <returns></returns>
static public Mutex CreateCompilerLock(string compiledScriptFile)
{
Expand All @@ -1148,11 +1150,31 @@ static public Mutex CreateCompilerLock(string compiledScriptFile)
/// <param name="refAssemblies">The string array containing file names to the additional assemblies referenced by the script. </param>
/// <returns>Compiled assembly file name.</returns>
static public string CompileWithConfig(string scriptFile, string assemblyFile, bool debugBuild, Settings scriptSettings, string compilerOptions, params string[] refAssemblies)
{
CompilingInfo compilingInfo;
return CompileWithConfig(scriptFile, assemblyFile, debugBuild, scriptSettings, compilerOptions, out compilingInfo, refAssemblies);
}

/// <summary>
/// Compiles script file into assembly with CSExecutor. Uses script engine settings object and compiler specific options.
/// </summary>
/// <param name="scriptFile">The path to the script file to be compiled.</param>
/// <param name="assemblyFile">The path of the compiled assembly to be created. If set to null a temporary file name will be used.</param>
/// <param name="debugBuild">'true' if debug information should be included in assembly; otherwise, 'false'.</param>
/// <param name="scriptSettings">The script engine Settings object.</param>
/// <param name="compilerOptions">The string value to be passed directly to the language compiler.</param>
/// <param name="compilingInfo">The compiling information. Populated with the compilation context.</param>
/// <param name="refAssemblies">The string array containing file names to the additional assemblies referenced by the script.</param>
/// <returns>
/// Compiled assembly file name.
/// </returns>
static public string CompileWithConfig(string scriptFile, string assemblyFile, bool debugBuild, Settings scriptSettings, string compilerOptions, out CompilingInfo compilingInfo, params string[] refAssemblies)
{
lock (typeof(CSScript))
{
using (Mutex fileLock = new Mutex(false, GetCompilerLockName(assemblyFile??scriptFile)))
using (Mutex fileLock = new Mutex(false, GetCompilerLockName(assemblyFile ?? scriptFile)))
{
compilingInfo = null;
ExecuteOptions oldOptions = CSExecutor.options;
try
{
Expand Down Expand Up @@ -1203,7 +1225,7 @@ static public string CompileWithConfig(string scriptFile, string assemblyFile, b
}
finally
{
LastCompilingResult = exec.LastCompileResult;
compilingInfo = LastCompilingResult = exec.LastCompileResult;
if (KeepCompilingHistory)
CompilingHistory.Add(new FileInfo(scriptFile), exec.LastCompileResult);
}
Expand Down
3 changes: 1 addition & 2 deletions Source/CSScriptLibrary/Evaluator.Extensions.Remote.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@ public interface IRemoteAgent
public static class AttachedProperies
{
#pragma warning disable 1591 // Missing XML comment for publicly visible type or member
#pragma warning restore 1591 // Missing XML comment for publicly visible type or member

public static ConditionalWeakTable<object, Dictionary<string, object>> ObjectCache = new ConditionalWeakTable<object, Dictionary<string, object>>();
#pragma warning restore 1591 // Missing XML comment for publicly visible type or member

/// <summary>
/// Sets the named value to the object.
Expand Down
4 changes: 2 additions & 2 deletions Source/CSScriptLibrary/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
// Build Number
// Revision
//
[assembly: AssemblyVersion("3.25.0.0")]
[assembly: AssemblyFileVersion("3.25.0.0")]
[assembly: AssemblyVersion("3.25.1.0")]
[assembly: AssemblyFileVersion("3.25.1.0")]

//
// In order to sign your assembly you must specify a key to use. Refer to the
Expand Down
4 changes: 2 additions & 2 deletions Source/NAnt.CSScript/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@
// Build Number
// Revision
//
[assembly: AssemblyVersion("3.25.0.0")]
[assembly: AssemblyFileVersion("3.25.0.0")]
[assembly: AssemblyVersion("3.25.1.0")]
[assembly: AssemblyFileVersion("3.25.1.0")]
10 changes: 1 addition & 9 deletions Source/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -479,21 +479,13 @@ public bool ReportDetailedErrorInfo
/// <c>true</c> if Optimistic Concurrency model otherwise, <c>false</c>.
/// </value>
[Browsable(false)]
public bool OptimisticConcurrencyModel
internal bool OptimisticConcurrencyModel
{
get { return optimisticConcurrencyModel; }
set { optimisticConcurrencyModel = value; }
}
bool optimisticConcurrencyModel = true;


[Browsable(false)]
public bool ConcurrencyModel
{
get { return optimisticConcurrencyModel; }
set { optimisticConcurrencyModel = value; }
}

/// <summary>
/// Gets or sets a value indicating whether auto-class decoration should allow C# 6 specific syntax.
/// If it does the statement "using static dbg;" will be injected at the start of the auto-class definition thus the
Expand Down
4 changes: 2 additions & 2 deletions Source/cscscript/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@
// Build Number
// Revision
//
[assembly: AssemblyVersion("3.25.0.0")]
[assembly: AssemblyFileVersion("3.25.0.0")]
[assembly: AssemblyVersion("3.25.1.0")]
[assembly: AssemblyFileVersion("3.25.1.0")]
4 changes: 2 additions & 2 deletions Source/css_config/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@
// Build Number
// Revision
//
[assembly: AssemblyVersion("3.25.0.0")]
[assembly: AssemblyFileVersion("3.25.0.0")]
[assembly: AssemblyVersion("3.25.1.0")]
[assembly: AssemblyFileVersion("3.25.1.0")]
4 changes: 2 additions & 2 deletions Source/cswscript/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:

[assembly: AssemblyVersion("3.25.0.0")]
[assembly: AssemblyFileVersion("3.25.0.0")]
[assembly: AssemblyVersion("3.25.1.0")]
[assembly: AssemblyFileVersion("3.25.1.0")]
//
// In order to sign your assembly you must specify a key to use. Refer to the
// Microsoft .NET Framework documentation for more information on assembly signing.
Expand Down

0 comments on commit 8af0b64

Please sign in to comment.