Skip to content

Commit e07faec

Browse files
committed
перенос EnumValues из Machine.Contexts в Core.Values
1 parent 99ed715 commit e07faec

19 files changed

+21
-6
lines changed

src/ScriptEngine/Machine/Contexts/ClrEnumValueWrapper.cs renamed to src/OneScript.Core/Values/ClrEnumValueWrapper.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This Source Code Form is subject to the terms of the
88
using OneScript.Commons;
99
using OneScript.Types;
1010

11-
namespace ScriptEngine.Machine.Contexts
11+
namespace OneScript.Values
1212
{
1313
public class ClrEnumValueWrapper<T> : EnumerationValue, IObjectWrapper where T :struct
1414
{
@@ -24,7 +24,7 @@ public ClrEnumValueWrapper(TypeDescriptor systemType, T realValue, string name,
2424

2525
public T UnderlyingValue => _realValue;
2626

27-
public override bool Equals(IValue other)
27+
public override bool Equals(BslValue other)
2828
{
2929
if (!(other?.GetRawValue() is ClrEnumValueWrapper<T> otherWrapper))
3030
return false;

src/ScriptEngine/Machine/Contexts/EnumerationValue.cs renamed to src/OneScript.Core/Values/EnumerationValue.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ This Source Code Form is subject to the terms of the
99
using OneScript.Exceptions;
1010
using OneScript.Localization;
1111
using OneScript.Types;
12-
using OneScript.Values;
1312
using System;
13+
using ScriptEngine.Machine;
1414

15-
namespace ScriptEngine.Machine.Contexts
15+
namespace OneScript.Values
1616
{
1717
public abstract class EnumerationValue : BslValue
1818
{

src/OneScript.StandardLibrary/Binary/FileStreamContext.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ This Source Code Form is subject to the terms of the
1010
using OneScript.Contexts;
1111
using OneScript.Exceptions;
1212
using OneScript.Types;
13+
using OneScript.Values;
1314
using ScriptEngine.Machine;
1415
using ScriptEngine.Machine.Contexts;
1516

src/OneScript.StandardLibrary/DriveInfo/DriveTypeEnum.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ This Source Code Form is subject to the terms of the
77

88
using OneScript.Contexts.Enums;
99
using OneScript.Types;
10+
using OneScript.Values;
1011
using ScriptEngine.Machine.Contexts;
1112

1213
namespace OneScript.StandardLibrary.DriveInfo

src/OneScript.StandardLibrary/Json/JSONWriterSettings.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ This Source Code Form is subject to the terms of the
66
----------------------------------------------------------*/
77

88
using OneScript.Contexts;
9+
using OneScript.Values;
910
using ScriptEngine.Machine;
1011
using ScriptEngine.Machine.Contexts;
1112

src/OneScript.StandardLibrary/SystemEnvironmentContext.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ This Source Code Form is subject to the terms of the
1212
using OneScript.Contexts;
1313
using OneScript.Exceptions;
1414
using OneScript.StandardLibrary.Collections;
15+
using OneScript.Values;
1516
using ScriptEngine;
1617
using ScriptEngine.HostedScript.Library;
1718
using ScriptEngine.Machine;

src/OneScript.StandardLibrary/Tasks/BackgroundTasksManager.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ This Source Code Form is subject to the terms of the
1515
using OneScript.Exceptions;
1616
using OneScript.StandardLibrary.Collections;
1717
using OneScript.Types;
18+
using OneScript.Values;
1819
using ScriptEngine.Machine;
1920
using ScriptEngine.Machine.Contexts;
2021
using ExecutionContext = ScriptEngine.Machine.ExecutionContext;

src/OneScript.StandardLibrary/Text/ConsoleColorEnum.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ This Source Code Form is subject to the terms of the
88
using System;
99
using OneScript.Contexts.Enums;
1010
using OneScript.Types;
11+
using OneScript.Values;
1112
using ScriptEngine.Machine.Contexts;
1213

1314
namespace OneScript.StandardLibrary.Text

src/OneScript.StandardLibrary/Text/ConsoleContext.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ This Source Code Form is subject to the terms of the
1010
using OneScript.Contexts;
1111
using OneScript.Exceptions;
1212
using OneScript.StandardLibrary.Binary;
13+
using OneScript.Values;
1314
using ScriptEngine.Machine;
1415
using ScriptEngine.Machine.Contexts;
1516

src/OneScript.StandardLibrary/Text/TextEncodingEnum.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ This Source Code Form is subject to the terms of the
1111
using OneScript.Types;
1212
using ScriptEngine.Machine;
1313
using ScriptEngine.Machine.Contexts;
14+
using OneScript.Values;
1415

1516
namespace OneScript.StandardLibrary.Text
1617
{

0 commit comments

Comments
 (0)