Skip to content

Commit

Permalink
fixes #1411 расхождение английских алиасов для некоторых методов
Browse files Browse the repository at this point in the history
  • Loading branch information
EvilBeaver committed Nov 5, 2024
1 parent 6c063ec commit 7215e37
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
5 changes: 3 additions & 2 deletions src/OneScript.StandardLibrary/Binary/GlobalBinaryData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,9 @@ public static IAttachableContext CreateInstance()
/// </summary>
/// <param name="array">Массив объектов типа ДвоичныеДанные.</param>
/// <returns>Тип: ДвоичныеДанные.</returns>
[ContextMethod("СоединитьДвоичныеДанные")]
public BinaryDataContext ConcatenateBinaryData(ArrayImpl array)
[ContextMethod("СоединитьДвоичныеДанные", "ConcatenateBinaryData", IsDeprecated = true)]
[ContextMethod("СоединитьДвоичныеДанные", "ConcatBinaryData")]
public BinaryDataContext ConcatBinaryData(ArrayImpl array)
{
CheckAndThrowIfNull(array);

Expand Down
5 changes: 3 additions & 2 deletions src/OneScript.StandardLibrary/FileContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,9 @@ public string Extension
}
}

[ContextMethod("Существует","Exist")]
public bool Exist()
[ContextMethod("Существует","Exist", IsDeprecated = true)]
[ContextMethod("Существует","Exists")]
public bool Exists()
{
if (_givenName == String.Empty)
return false;
Expand Down
2 changes: 1 addition & 1 deletion src/OneScript.StandardLibrary/FileOperations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public ArrayImpl FindFiles(string dir, string mask = null, bool recursive = fals
{
// fix 225, 227, 228
var fObj = new FileContext(dir);
if(fObj.Exist())
if(fObj.Exists())
{
return new ArrayImpl(new[] { fObj });
}
Expand Down
6 changes: 4 additions & 2 deletions src/OneScript.StandardLibrary/Http/HttpRequestContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,15 @@ public IValue GetBodyFileName()
/// Установить тело запроса из объекта ДвоичныеДанные
/// </summary>
/// <param name="data"></param>
[ContextMethod("УстановитьТелоИзДвоичныхДанных", "SetBodyFromBinary")]
[ContextMethod("УстановитьТелоИзДвоичныхДанных", "SetBodyFromBinary", IsDeprecated = true)]
[ContextMethod("УстановитьТелоИзДвоичныхДанных", "SetBodyFromBinaryData")]
public void SetBodyFromBinary(BinaryDataContext data)
{
SetBody(new HttpRequestBodyBinary(data));
}

[ContextMethod("ПолучитьТелоКакДвоичныеДанные", "GetBodyAsBinary")]
[ContextMethod("ПолучитьТелоКакДвоичныеДанные", "GetBodyAsBinary", IsDeprecated = true)]
[ContextMethod("ПолучитьТелоКакДвоичныеДанные", "GetBodyAsBinaryData")]
public IValue GetBodyFromBinary()
{
return _body?.GetAsBinary();
Expand Down

0 comments on commit 7215e37

Please sign in to comment.