Skip to content

Commit

Permalink
перенос EnumValues из Machine.Contexts в Core.Values
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Rm committed Nov 18, 2024
1 parent c6b4245 commit 5a4421b
Show file tree
Hide file tree
Showing 19 changed files with 21 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<T> : EnumerationValue, IObjectWrapper where T :struct
{
Expand All @@ -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<T> otherWrapper))
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
1 change: 1 addition & 0 deletions src/OneScript.StandardLibrary/Binary/FileStreamContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 1 addition & 0 deletions src/OneScript.StandardLibrary/DriveInfo/DriveTypeEnum.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/OneScript.StandardLibrary/Json/JSONWriterSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 1 addition & 0 deletions src/OneScript.StandardLibrary/SystemEnvironmentContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions src/OneScript.StandardLibrary/Text/ConsoleColorEnum.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/OneScript.StandardLibrary/Text/ConsoleContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 1 addition & 0 deletions src/OneScript.StandardLibrary/Text/TextEncodingEnum.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 1 addition & 0 deletions src/OneScript.StandardLibrary/Xml/XmlReaderImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 1 addition & 0 deletions src/OneScript.StandardLibrary/Zip/ZipWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
3 changes: 1 addition & 2 deletions src/ScriptEngine/Machine/Contexts/ClrEnumWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
1 change: 1 addition & 0 deletions src/ScriptEngine/Machine/Contexts/ContextDiscoverer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/ScriptEngine/Machine/Contexts/EnumContextHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
1 change: 1 addition & 0 deletions src/ScriptEngine/Machine/Contexts/EnumerationContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down

0 comments on commit 5a4421b

Please sign in to comment.