@@ -32,7 +32,7 @@ internal abstract partial class ActiveScriptJsEngineBase : InnerJsEngineBase
3232 /// <summary>
3333 /// List of host items
3434 /// </summary>
35- private readonly Dictionary < string , object > _hostItems = new Dictionary < string , object > ( ) ;
35+ protected readonly Dictionary < string , object > _hostItems = new Dictionary < string , object > ( ) ;
3636
3737 /// <summary>
3838 /// Last Active Script exception
@@ -403,7 +403,7 @@ private object InnerGetVariableValue(string variableName)
403403 /// </summary>
404404 /// <param name="variableName">Name of variable</param>
405405 /// <param name="value">Value of variable</param>
406- private void InnerSetVariableValue ( string variableName , object value )
406+ protected void InnerSetVariableValue ( string variableName , object value )
407407 {
408408 object [ ] args = { value } ;
409409
@@ -425,6 +425,12 @@ private void InnerSetVariableValue(string variableName, object value)
425425 }
426426 }
427427
428+ /// <summary>
429+ /// Removes a variable
430+ /// </summary>
431+ /// <param name="variableName">Name of variable</param>
432+ protected abstract void InnerRemoveVariable ( string variableName ) ;
433+
428434 private void InnerEmbedHostItem ( string itemName , object value )
429435 {
430436 object oldValue = null ;
@@ -719,12 +725,7 @@ public override void RemoveVariable(string variableName)
719725
720726 try
721727 {
722- InnerSetVariableValue ( variableName , null ) ;
723-
724- if ( _hostItems . ContainsKey ( variableName ) )
725- {
726- _hostItems . Remove ( variableName ) ;
727- }
728+ InnerRemoveVariable ( variableName ) ;
728729 }
729730 catch ( ActiveScriptException e )
730731 {
0 commit comments