diff --git a/src/ScriptEngine/Machine/Contexts/ClrEnumValueWrapper.cs b/src/OneScript.Core/Values/ClrEnumValueWrapper.cs similarity index 92% rename from src/ScriptEngine/Machine/Contexts/ClrEnumValueWrapper.cs rename to src/OneScript.Core/Values/ClrEnumValueWrapper.cs index a82ecfcc3..95970adf1 100644 --- a/src/ScriptEngine/Machine/Contexts/ClrEnumValueWrapper.cs +++ b/src/OneScript.Core/Values/ClrEnumValueWrapper.cs @@ -8,7 +8,7 @@ This Source Code Form is subject to the terms of the using OneScript.Commons; using OneScript.Types; -namespace ScriptEngine.Machine.Contexts +namespace OneScript.Values { public class ClrEnumValueWrapper : EnumerationValue, IObjectWrapper where T :struct { @@ -24,7 +24,7 @@ public ClrEnumValueWrapper(TypeDescriptor systemType, T realValue, string name, public T UnderlyingValue => _realValue; - public override bool Equals(IValue other) + public override bool Equals(BslValue other) { if (!(other?.GetRawValue() is ClrEnumValueWrapper otherWrapper)) return false; diff --git a/src/ScriptEngine/Machine/Contexts/EnumerationValue.cs b/src/OneScript.Core/Values/EnumerationValue.cs similarity index 96% rename from src/ScriptEngine/Machine/Contexts/EnumerationValue.cs rename to src/OneScript.Core/Values/EnumerationValue.cs index 1c8b13272..4d91d31bb 100644 --- a/src/ScriptEngine/Machine/Contexts/EnumerationValue.cs +++ b/src/OneScript.Core/Values/EnumerationValue.cs @@ -9,10 +9,10 @@ This Source Code Form is subject to the terms of the using OneScript.Exceptions; using OneScript.Localization; using OneScript.Types; -using OneScript.Values; using System; +using ScriptEngine.Machine; -namespace ScriptEngine.Machine.Contexts +namespace OneScript.Values { public abstract class EnumerationValue : BslValue { diff --git a/src/OneScript.StandardLibrary/Binary/FileStreamContext.cs b/src/OneScript.StandardLibrary/Binary/FileStreamContext.cs index 823e96ef6..fb7b67294 100644 --- a/src/OneScript.StandardLibrary/Binary/FileStreamContext.cs +++ b/src/OneScript.StandardLibrary/Binary/FileStreamContext.cs @@ -10,6 +10,7 @@ This Source Code Form is subject to the terms of the using OneScript.Contexts; using OneScript.Exceptions; using OneScript.Types; +using OneScript.Values; using ScriptEngine.Machine; using ScriptEngine.Machine.Contexts; diff --git a/src/OneScript.StandardLibrary/DriveInfo/DriveTypeEnum.cs b/src/OneScript.StandardLibrary/DriveInfo/DriveTypeEnum.cs index f8320c1e7..44d5a73e3 100644 --- a/src/OneScript.StandardLibrary/DriveInfo/DriveTypeEnum.cs +++ b/src/OneScript.StandardLibrary/DriveInfo/DriveTypeEnum.cs @@ -7,6 +7,7 @@ This Source Code Form is subject to the terms of the using OneScript.Contexts.Enums; using OneScript.Types; +using OneScript.Values; using ScriptEngine.Machine.Contexts; namespace OneScript.StandardLibrary.DriveInfo diff --git a/src/OneScript.StandardLibrary/Json/JSONWriterSettings.cs b/src/OneScript.StandardLibrary/Json/JSONWriterSettings.cs index bbd82ebd6..44ea6bcb2 100644 --- a/src/OneScript.StandardLibrary/Json/JSONWriterSettings.cs +++ b/src/OneScript.StandardLibrary/Json/JSONWriterSettings.cs @@ -6,6 +6,7 @@ This Source Code Form is subject to the terms of the ----------------------------------------------------------*/ using OneScript.Contexts; +using OneScript.Values; using ScriptEngine.Machine; using ScriptEngine.Machine.Contexts; diff --git a/src/OneScript.StandardLibrary/SystemEnvironmentContext.cs b/src/OneScript.StandardLibrary/SystemEnvironmentContext.cs index fd57231a2..57b74b6b2 100644 --- a/src/OneScript.StandardLibrary/SystemEnvironmentContext.cs +++ b/src/OneScript.StandardLibrary/SystemEnvironmentContext.cs @@ -12,6 +12,7 @@ This Source Code Form is subject to the terms of the using OneScript.Contexts; using OneScript.Exceptions; using OneScript.StandardLibrary.Collections; +using OneScript.Values; using ScriptEngine; using ScriptEngine.HostedScript.Library; using ScriptEngine.Machine; diff --git a/src/OneScript.StandardLibrary/Tasks/BackgroundTasksManager.cs b/src/OneScript.StandardLibrary/Tasks/BackgroundTasksManager.cs index b29110e35..cece7e540 100644 --- a/src/OneScript.StandardLibrary/Tasks/BackgroundTasksManager.cs +++ b/src/OneScript.StandardLibrary/Tasks/BackgroundTasksManager.cs @@ -15,6 +15,7 @@ This Source Code Form is subject to the terms of the using OneScript.Exceptions; using OneScript.StandardLibrary.Collections; using OneScript.Types; +using OneScript.Values; using ScriptEngine.Machine; using ScriptEngine.Machine.Contexts; using ExecutionContext = ScriptEngine.Machine.ExecutionContext; diff --git a/src/OneScript.StandardLibrary/Text/ConsoleColorEnum.cs b/src/OneScript.StandardLibrary/Text/ConsoleColorEnum.cs index 5a6101f00..dc0cf548d 100644 --- a/src/OneScript.StandardLibrary/Text/ConsoleColorEnum.cs +++ b/src/OneScript.StandardLibrary/Text/ConsoleColorEnum.cs @@ -8,6 +8,7 @@ This Source Code Form is subject to the terms of the using System; using OneScript.Contexts.Enums; using OneScript.Types; +using OneScript.Values; using ScriptEngine.Machine.Contexts; namespace OneScript.StandardLibrary.Text diff --git a/src/OneScript.StandardLibrary/Text/ConsoleContext.cs b/src/OneScript.StandardLibrary/Text/ConsoleContext.cs index 76f547229..f0c484672 100644 --- a/src/OneScript.StandardLibrary/Text/ConsoleContext.cs +++ b/src/OneScript.StandardLibrary/Text/ConsoleContext.cs @@ -10,6 +10,7 @@ This Source Code Form is subject to the terms of the using OneScript.Contexts; using OneScript.Exceptions; using OneScript.StandardLibrary.Binary; +using OneScript.Values; using ScriptEngine.Machine; using ScriptEngine.Machine.Contexts; diff --git a/src/OneScript.StandardLibrary/Text/TextEncodingEnum.cs b/src/OneScript.StandardLibrary/Text/TextEncodingEnum.cs index 1a6e125d3..33ce7cf7c 100644 --- a/src/OneScript.StandardLibrary/Text/TextEncodingEnum.cs +++ b/src/OneScript.StandardLibrary/Text/TextEncodingEnum.cs @@ -11,6 +11,7 @@ This Source Code Form is subject to the terms of the using OneScript.Types; using ScriptEngine.Machine; using ScriptEngine.Machine.Contexts; +using OneScript.Values; namespace OneScript.StandardLibrary.Text { diff --git a/src/OneScript.StandardLibrary/XMLSchema/Objects/XMLSchema.cs b/src/OneScript.StandardLibrary/XMLSchema/Objects/XMLSchema.cs index 0a5c6d21c..cd5a042a7 100644 --- a/src/OneScript.StandardLibrary/XMLSchema/Objects/XMLSchema.cs +++ b/src/OneScript.StandardLibrary/XMLSchema/Objects/XMLSchema.cs @@ -18,6 +18,7 @@ This Source Code Form is subject to the terms of the using OneScript.StandardLibrary.XMLSchema.Enumerations; using OneScript.StandardLibrary.XMLSchema.Interfaces; using OneScript.Types; +using OneScript.Values; using ScriptEngine; using ScriptEngine.Machine; using ScriptEngine.Machine.Contexts; diff --git a/src/OneScript.StandardLibrary/XMLSchema/Objects/XSAttributeDeclaration.cs b/src/OneScript.StandardLibrary/XMLSchema/Objects/XSAttributeDeclaration.cs index f14d66161..cbb47d518 100644 --- a/src/OneScript.StandardLibrary/XMLSchema/Objects/XSAttributeDeclaration.cs +++ b/src/OneScript.StandardLibrary/XMLSchema/Objects/XSAttributeDeclaration.cs @@ -15,6 +15,7 @@ This Source Code Form is subject to the terms of the using OneScript.StandardLibrary.XMLSchema.Interfaces; using ScriptEngine.Machine; using ScriptEngine.Machine.Contexts; +using OneScript.Values; namespace OneScript.StandardLibrary.XMLSchema.Objects { diff --git a/src/OneScript.StandardLibrary/XMLSchema/Objects/XSElementDeclaration.cs b/src/OneScript.StandardLibrary/XMLSchema/Objects/XSElementDeclaration.cs index 272d1c17e..27ccf2bcd 100644 --- a/src/OneScript.StandardLibrary/XMLSchema/Objects/XSElementDeclaration.cs +++ b/src/OneScript.StandardLibrary/XMLSchema/Objects/XSElementDeclaration.cs @@ -13,6 +13,7 @@ This Source Code Form is subject to the terms of the using OneScript.StandardLibrary.XMLSchema.Collections; using OneScript.StandardLibrary.XMLSchema.Enumerations; using OneScript.StandardLibrary.XMLSchema.Interfaces; +using OneScript.Values; using ScriptEngine.Machine; using ScriptEngine.Machine.Contexts; diff --git a/src/OneScript.StandardLibrary/Xml/XmlReaderImpl.cs b/src/OneScript.StandardLibrary/Xml/XmlReaderImpl.cs index 9d960f962..271da43a4 100644 --- a/src/OneScript.StandardLibrary/Xml/XmlReaderImpl.cs +++ b/src/OneScript.StandardLibrary/Xml/XmlReaderImpl.cs @@ -11,6 +11,7 @@ This Source Code Form is subject to the terms of the using OneScript.Contexts; using OneScript.Exceptions; using OneScript.Types; +using OneScript.Values; using ScriptEngine.Machine; using ScriptEngine.Machine.Contexts; diff --git a/src/OneScript.StandardLibrary/Zip/ZipWriter.cs b/src/OneScript.StandardLibrary/Zip/ZipWriter.cs index 856593a40..3ab846ff9 100644 --- a/src/OneScript.StandardLibrary/Zip/ZipWriter.cs +++ b/src/OneScript.StandardLibrary/Zip/ZipWriter.cs @@ -13,6 +13,7 @@ This Source Code Form is subject to the terms of the using Ionic.Zlib; using OneScript.Contexts; using OneScript.Exceptions; +using OneScript.Values; using ScriptEngine.Machine; using ScriptEngine.Machine.Contexts; diff --git a/src/ScriptEngine/Machine/Contexts/ClrEnumWrapper.cs b/src/ScriptEngine/Machine/Contexts/ClrEnumWrapper.cs index 8939e4eb2..e9d881b14 100644 --- a/src/ScriptEngine/Machine/Contexts/ClrEnumWrapper.cs +++ b/src/ScriptEngine/Machine/Contexts/ClrEnumWrapper.cs @@ -7,10 +7,9 @@ This Source Code Form is subject to the terms of the using System; using System.Collections.Generic; -using System.Runtime.CompilerServices; -using OneScript.Commons; using OneScript.Contexts.Enums; using OneScript.Types; +using OneScript.Values; namespace ScriptEngine.Machine.Contexts { diff --git a/src/ScriptEngine/Machine/Contexts/ContextDiscoverer.cs b/src/ScriptEngine/Machine/Contexts/ContextDiscoverer.cs index 98dd2b77d..f971cb5d4 100644 --- a/src/ScriptEngine/Machine/Contexts/ContextDiscoverer.cs +++ b/src/ScriptEngine/Machine/Contexts/ContextDiscoverer.cs @@ -14,6 +14,7 @@ This Source Code Form is subject to the terms of the using OneScript.Contexts.Enums; using OneScript.DependencyInjection; using OneScript.Types; +using OneScript.Values; using ScriptEngine.Types; namespace ScriptEngine.Machine.Contexts diff --git a/src/ScriptEngine/Machine/Contexts/EnumContextHelper.cs b/src/ScriptEngine/Machine/Contexts/EnumContextHelper.cs index 87440ebab..7dc7ea376 100644 --- a/src/ScriptEngine/Machine/Contexts/EnumContextHelper.cs +++ b/src/ScriptEngine/Machine/Contexts/EnumContextHelper.cs @@ -7,6 +7,7 @@ This Source Code Form is subject to the terms of the using System; using OneScript.Contexts.Enums; using OneScript.Types; +using OneScript.Values; namespace ScriptEngine.Machine.Contexts { diff --git a/src/ScriptEngine/Machine/Contexts/EnumerationContext.cs b/src/ScriptEngine/Machine/Contexts/EnumerationContext.cs index cd590b7af..8d8894866 100644 --- a/src/ScriptEngine/Machine/Contexts/EnumerationContext.cs +++ b/src/ScriptEngine/Machine/Contexts/EnumerationContext.cs @@ -10,6 +10,7 @@ This Source Code Form is subject to the terms of the using OneScript.Commons; using OneScript.Contexts; using OneScript.Types; +using OneScript.Values; namespace ScriptEngine.Machine.Contexts {