| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 044733c commit 69ce8fa
540 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -18,6 +18,7 @@ | |||
| 18 | 18 | <s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ANONYMOUS_METHOD_DECLARATION_BRACES/@EntryValue">NEXT_LINE</s:String> | |
| 19 | 19 | <s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/CASE_BLOCK_BRACES/@EntryValue">NEXT_LINE</s:String> | |
| 20 | 20 | <s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/INITIALIZER_BRACES/@EntryValue">NEXT_LINE</s:String> | |
| 21 | + <s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_ACCESSORHOLDER_ATTRIBUTE_ON_SAME_LINE_EX/@EntryValue">NEVER</s:String> | ||
| 21 | 22 | <s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_AFTER_TYPECAST_PARENTHESES/@EntryValue">False</s:Boolean> | |
| 22 | 23 | <s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_AROUND_MULTIPLICATIVE_OP/@EntryValue">True</s:Boolean> | |
| 23 | 24 | <s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_BEFORE_SIZEOF_PARENTHESES/@EntryValue">False</s:Boolean> | |
@@ -40,6 +41,11 @@ | |||
| 40 | 41 | <s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateInstanceFields/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String> | |
| 41 | 42 | <s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateStaticFields/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String> | |
| 42 | 43 | <s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateStaticReadonly/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String> | |
| 44 | + <s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpAttributeForSingleLineMethodUpgrade/@EntryIndexedValue">True</s:Boolean> | ||
| 45 | + <s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpKeepExistingMigration/@EntryIndexedValue">True</s:Boolean> | ||
| 46 | + <s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpPlaceEmbeddedOnSameLineMigration/@EntryIndexedValue">True</s:Boolean> | ||
| 47 | + <s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpRenamePlacementToArrangementMigration/@EntryIndexedValue">True</s:Boolean> | ||
| 43 | 48 | <s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAddAccessorOwnerDeclarationBracesMigration/@EntryIndexedValue">True</s:Boolean> | |
| 49 | + <s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002ECSharpPlaceAttributeOnSameLineMigration/@EntryIndexedValue">True</s:Boolean> | ||
| 44 | 50 | <s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean> | |
| 45 | 51 | <s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateThisQualifierSettings/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -18,6 +18,7 @@ | |||
| 18 | 18 | <s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ANONYMOUS_METHOD_DECLARATION_BRACES/@EntryValue">NEXT_LINE</s:String> | |
| 19 | 19 | <s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/CASE_BLOCK_BRACES/@EntryValue">NEXT_LINE</s:String> | |
| 20 | 20 | <s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/INITIALIZER_BRACES/@EntryValue">NEXT_LINE</s:String> | |
| 21 | + <s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_ACCESSORHOLDER_ATTRIBUTE_ON_SAME_LINE_EX/@EntryValue">NEVER</s:String> | ||
| 21 | 22 | <s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_AFTER_TYPECAST_PARENTHESES/@EntryValue">False</s:Boolean> | |
| 22 | 23 | <s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_AROUND_MULTIPLICATIVE_OP/@EntryValue">True</s:Boolean> | |
| 23 | 24 | <s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_BEFORE_SIZEOF_PARENTHESES/@EntryValue">False</s:Boolean> | |
@@ -40,6 +41,11 @@ | |||
| 40 | 41 | <s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateInstanceFields/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String> | |
| 41 | 42 | <s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateStaticFields/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String> | |
| 42 | 43 | <s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateStaticReadonly/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /></s:String> | |
| 44 | + <s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpAttributeForSingleLineMethodUpgrade/@EntryIndexedValue">True</s:Boolean> | ||
| 45 | + <s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpKeepExistingMigration/@EntryIndexedValue">True</s:Boolean> | ||
| 46 | + <s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpPlaceEmbeddedOnSameLineMigration/@EntryIndexedValue">True</s:Boolean> | ||
| 47 | + <s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpRenamePlacementToArrangementMigration/@EntryIndexedValue">True</s:Boolean> | ||
| 43 | 48 | <s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAddAccessorOwnerDeclarationBracesMigration/@EntryIndexedValue">True</s:Boolean> | |
| 49 | + <s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002ECSharpPlaceAttributeOnSameLineMigration/@EntryIndexedValue">True</s:Boolean> | ||
| 44 | 50 | <s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean> | |
| 45 | 51 | <s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateThisQualifierSettings/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,5 +5,5 @@ | |||
| 5 | 5 | ||
| 6 | 6 | #pragma once | |
| 7 | 7 | ||
| 8 | - #define CLEARSCRIPT_VERSION_STRING "5.5.1.1" | ||
| 9 | - #define CLEARSCRIPT_VERSION_COMMA_SEPARATED 5,5,1,1 | ||
| 8 | + #define CLEARSCRIPT_VERSION_STRING "5.5.2.0" | ||
| 9 | + #define CLEARSCRIPT_VERSION_COMMA_SEPARATED 5,5,2,0 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -41,7 +41,12 @@ public interface IScriptEngineException | |||
| 41 | 41 | bool ExecutionStarted { get; } | |
| 42 | 42 | ||
| 43 | 43 | /// <summary> | |
| 44 | - /// Gets the exception that caused the current exception to be thrown, or <c>null</c> if one was not specified. | ||
| 44 | + /// Gets the script exception that caused the current exception to be thrown, or <c>null</c> if one was not specified. | ||
| 45 | + /// </summary> | ||
| 46 | + dynamic ScriptException { get; } | ||
| 47 | + | ||
| 48 | + /// <summary> | ||
| 49 | + /// Gets the host exception that caused the current exception to be thrown, or <c>null</c> if one was not specified. | ||
| 45 | 50 | /// </summary> | |
| 46 | 51 | Exception InnerException { get; } | |
| 47 | 52 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -17,13 +17,13 @@ | |||
| 17 | 17 | [assembly: InternalsVisibleTo("ClearScriptTest")] | |
| 18 | 18 | ||
| 19 | 19 | [assembly: ComVisible(false)] | |
| 20 | - [assembly: AssemblyVersion("5.5.1.1")] | ||
| 21 | - [assembly: AssemblyFileVersion("5.5.1.1")] | ||
| 20 | + [assembly: AssemblyVersion("5.5.2.0")] | ||
| 21 | + [assembly: AssemblyFileVersion("5.5.2.0")] | ||
| 22 | 22 | ||
| 23 | 23 | namespace Microsoft.ClearScript.Properties | |
| 24 | 24 | { | |
| 25 | 25 | internal static class ClearScriptVersion | |
| 26 | 26 | { | |
| 27 | - public const string Value = "5.5.1.1"; | ||
| 27 | + public const string Value = "5.5.2.0"; | ||
| 28 | 28 | } | |
| 29 | 29 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1272,32 +1272,12 @@ internal virtual void OnAccessSettingsChanged() | |||
| 1272 | 1272 | ||
| 1273 | 1273 | internal virtual void HostInvoke(Action action) | |
| 1274 | 1274 | { | |
| 1275 | - var previousEngine = currentEngine; | ||
| 1276 | - currentEngine = this; | ||
| 1277 | - | ||
| 1278 | - try | ||
| 1279 | - { | ||
| 1280 | - action(); | ||
| 1281 | - } | ||
| 1282 | - finally | ||
| 1283 | - { | ||
| 1284 | - currentEngine = previousEngine; | ||
| 1285 | - } | ||
| 1275 | + action(); | ||
| 1286 | 1276 | } | |
| 1287 | 1277 | ||
| 1288 | 1278 | internal virtual T HostInvoke<T>(Func<T> func) | |
| 1289 | 1279 | { | |
| 1290 | - var previousEngine = currentEngine; | ||
| 1291 | - currentEngine = this; | ||
| 1292 | - | ||
| 1293 | - try | ||
| 1294 | - { | ||
| 1295 | - return func(); | ||
| 1296 | - } | ||
| 1297 | - finally | ||
| 1298 | - { | ||
| 1299 | - currentEngine = previousEngine; | ||
| 1300 | - } | ||
| 1280 | + return func(); | ||
| 1301 | 1281 | } | |
| 1302 | 1282 | ||
| 1303 | 1283 | #endregion | |
@@ -1306,7 +1286,28 @@ internal virtual T HostInvoke<T>(Func<T> func) | |||
| 1306 | 1286 | ||
| 1307 | 1287 | internal ScriptFrame CurrentScriptFrame { get; private set; } | |
| 1308 | 1288 | ||
| 1289 | + internal IDisposable CreateEngineScope() | ||
| 1290 | + { | ||
| 1291 | + return Scope.Create(() => MiscHelpers.Exchange(ref currentEngine, this), previousEngine => currentEngine = previousEngine); | ||
| 1292 | + } | ||
| 1293 | + | ||
| 1309 | 1294 | internal virtual void ScriptInvoke(Action action) | |
| 1295 | + { | ||
| 1296 | + using (CreateEngineScope()) | ||
| 1297 | + { | ||
| 1298 | + ScriptInvokeInternal(action); | ||
| 1299 | + } | ||
| 1300 | + } | ||
| 1301 | + | ||
| 1302 | + internal virtual T ScriptInvoke<T>(Func<T> func) | ||
| 1303 | + { | ||
| 1304 | + using (CreateEngineScope()) | ||
| 1305 | + { | ||
| 1306 | + return ScriptInvokeInternal(func); | ||
| 1307 | + } | ||
| 1308 | + } | ||
| 1309 | + | ||
| 1310 | + internal void ScriptInvokeInternal(Action action) | ||
| 1310 | 1311 | { | |
| 1311 | 1312 | var previousScriptFrame = CurrentScriptFrame; | |
| 1312 | 1313 | CurrentScriptFrame = new ScriptFrame(); | |
@@ -1321,7 +1322,7 @@ internal virtual void ScriptInvoke(Action action) | |||
| 1321 | 1322 | } | |
| 1322 | 1323 | } | |
| 1323 | 1324 | ||
| 1324 | - internal virtual T ScriptInvoke<T>(Func<T> func) | ||
| 1325 | + internal T ScriptInvokeInternal<T>(Func<T> func) | ||
| 1325 | 1326 | { | |
| 1326 | 1327 | var previousScriptFrame = CurrentScriptFrame; | |
| 1327 | 1328 | CurrentScriptFrame = new ScriptFrame(); | |
@@ -1350,10 +1351,10 @@ internal static void ThrowScriptError(IScriptEngineException scriptError) | |||
| 1350 | 1351 | { | |
| 1351 | 1352 | if (scriptError is ScriptInterruptedException) | |
| 1352 | 1353 | { | |
| 1353 | - throw new ScriptInterruptedException(scriptError.EngineName, scriptError.Message, scriptError.ErrorDetails, scriptError.HResult, scriptError.IsFatal, scriptError.ExecutionStarted, scriptError.InnerException); | ||
| 1354 | + throw new ScriptInterruptedException(scriptError.EngineName, scriptError.Message, scriptError.ErrorDetails, scriptError.HResult, scriptError.IsFatal, scriptError.ExecutionStarted, scriptError.ScriptException, scriptError.InnerException); | ||
| 1354 | 1355 | } | |
| 1355 | 1356 | ||
| 1356 | - throw new ScriptEngineException(scriptError.EngineName, scriptError.Message, scriptError.ErrorDetails, scriptError.HResult, scriptError.IsFatal, scriptError.ExecutionStarted, scriptError.InnerException); | ||
| 1357 | + throw new ScriptEngineException(scriptError.EngineName, scriptError.Message, scriptError.ErrorDetails, scriptError.HResult, scriptError.IsFatal, scriptError.ExecutionStarted, scriptError.ScriptException, scriptError.InnerException); | ||
| 1357 | 1358 | } | |
| 1358 | 1359 | } | |
| 1359 | 1360 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -25,6 +25,7 @@ public class ScriptEngineException : InvalidOperationException, IScriptEngineExc | |||
| 25 | 25 | private readonly bool executionStarted; | |
| 26 | 26 | private const string executionStartedItemName = "ExecutionStarted"; | |
| 27 | 27 | ||
| 28 | + private readonly object scriptException; | ||
| 28 | 29 | private const string defaultMessage = "An error occurred during script execution"; | |
| 29 | 30 | ||
| 30 | 31 | #region constructors | |
@@ -76,14 +77,15 @@ protected ScriptEngineException(SerializationInfo info, StreamingContext context | |||
| 76 | 77 | executionStarted = info.GetBoolean(executionStartedItemName); | |
| 77 | 78 | } | |
| 78 | 79 | ||
| 79 | - internal ScriptEngineException(string engineName, string message, string errorDetails, int errorCode, bool isFatal, bool executionStarted, Exception innerException) | ||
| 80 | + internal ScriptEngineException(string engineName, string message, string errorDetails, int errorCode, bool isFatal, bool executionStarted, object scriptException, Exception innerException) | ||
| 80 | 81 | : base(MiscHelpers.EnsureNonBlank(message, defaultMessage), innerException) | |
| 81 | 82 | { | |
| 82 | 83 | this.engineName = engineName; | |
| 83 | 84 | // ReSharper disable once RedundantBaseQualifier | |
| 84 | 85 | this.errorDetails = MiscHelpers.EnsureNonBlank(errorDetails, base.Message); | |
| 85 | 86 | this.isFatal = isFatal; | |
| 86 | 87 | this.executionStarted = executionStarted; | |
| 88 | + this.scriptException = scriptException; | ||
| 87 | 89 | ||
| 88 | 90 | if (errorCode != 0) | |
| 89 | 91 | { | |
@@ -135,6 +137,14 @@ public bool ExecutionStarted | |||
| 135 | 137 | get { return executionStarted; } | |
| 136 | 138 | } | |
| 137 | 139 | ||
| 140 | + /// <summary> | ||
| 141 | + /// Gets the script exception that caused the current exception to be thrown, or <c>null</c> if one was not specified. | ||
| 142 | + /// </summary> | ||
| 143 | + public dynamic ScriptException | ||
| 144 | + { | ||
| 145 | + get { return scriptException; } | ||
| 146 | + } | ||
| 147 | + | ||
| 138 | 148 | #endregion | |
| 139 | 149 | ||
| 140 | 150 | #region Object overrides | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -25,6 +25,7 @@ public class ScriptInterruptedException : OperationCanceledException, IScriptEng | |||
| 25 | 25 | private readonly bool executionStarted; | |
| 26 | 26 | private const string executionStartedItemName = "ExecutionStarted"; | |
| 27 | 27 | ||
| 28 | + private readonly object scriptException; | ||
| 28 | 29 | private const string defaultMessage = "Script execution was interrupted"; | |
| 29 | 30 | ||
| 30 | 31 | #region constructors | |
@@ -76,14 +77,15 @@ protected ScriptInterruptedException(SerializationInfo info, StreamingContext co | |||
| 76 | 77 | executionStarted = info.GetBoolean(executionStartedItemName); | |
| 77 | 78 | } | |
| 78 | 79 | ||
| 79 | - internal ScriptInterruptedException(string engineName, string message, string errorDetails, int errorCode, bool isFatal, bool executionStarted, Exception innerException) | ||
| 80 | + internal ScriptInterruptedException(string engineName, string message, string errorDetails, int errorCode, bool isFatal, bool executionStarted, object scriptException, Exception innerException) | ||
| 80 | 81 | : base(MiscHelpers.EnsureNonBlank(message, defaultMessage), innerException) | |
| 81 | 82 | { | |
| 82 | 83 | this.engineName = engineName; | |
| 83 | 84 | // ReSharper disable once RedundantBaseQualifier | |
| 84 | 85 | this.errorDetails = MiscHelpers.EnsureNonBlank(errorDetails, base.Message); | |
| 85 | 86 | this.isFatal = isFatal; | |
| 86 | 87 | this.executionStarted = executionStarted; | |
| 88 | + this.scriptException = scriptException; | ||
| 87 | 89 | ||
| 88 | 90 | if (errorCode != 0) | |
| 89 | 91 | { | |
@@ -135,6 +137,14 @@ public bool ExecutionStarted | |||
| 135 | 137 | get { return executionStarted; } | |
| 136 | 138 | } | |
| 137 | 139 | ||
| 140 | + /// <summary> | ||
| 141 | + /// Gets the script exception that caused the current exception to be thrown, or <c>null</c> if one was not specified. | ||
| 142 | + /// </summary> | ||
| 143 | + public dynamic ScriptException | ||
| 144 | + { | ||
| 145 | + get { return scriptException; } | ||
| 146 | + } | ||
| 147 | + | ||
| 138 | 148 | #endregion | |
| 139 | 149 | ||
| 140 | 150 | #region Object overrides | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -27,10 +27,10 @@ public static void ThrowLastScriptError() | |||
| 27 | 27 | { | |
| 28 | 28 | if (scriptError is ScriptInterruptedException) | |
| 29 | 29 | { | |
| 30 | - throw new ScriptInterruptedException(scriptError.EngineName, scriptError.Message, scriptError.ErrorDetails, scriptError.HResult, scriptError.IsFatal, scriptError.ExecutionStarted, scriptError.InnerException); | ||
| 30 | + throw new ScriptInterruptedException(scriptError.EngineName, scriptError.Message, scriptError.ErrorDetails, scriptError.HResult, scriptError.IsFatal, scriptError.ExecutionStarted, scriptError.ScriptException, scriptError.InnerException); | ||
| 31 | 31 | } | |
| 32 | 32 | ||
| 33 | - throw new ScriptEngineException(scriptError.EngineName, scriptError.Message, scriptError.ErrorDetails, scriptError.HResult, scriptError.IsFatal, scriptError.ExecutionStarted, scriptError.InnerException); | ||
| 33 | + throw new ScriptEngineException(scriptError.EngineName, scriptError.Message, scriptError.ErrorDetails, scriptError.HResult, scriptError.IsFatal, scriptError.ExecutionStarted, scriptError.ScriptException, scriptError.InnerException); | ||
| 34 | 34 | } | |
| 35 | 35 | } | |
| 36 | 36 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments