/
n-dimens
/
pascalabcnet
Обзор
Документация
Войти
/
n-dimens
/
pascalabcnet
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
VisualPascalABCNETLinux/MonoDebugging/Debugger/StringMirror.cs
43 строки
948 B
Ivan Bondarev
missing files for debugger
18 апр 2023, 18:53
18 апр 2023, 18:53
d0397a4
Код
Авторство
О чём код?
using System; using System.Collections; namespace Mono.Debugger.Soft { public class StringMirror : ObjectMirror { int length; internal StringMirror (VirtualMachine vm, long id) : base (vm, id) { length = -1; } internal StringMirror (VirtualMachine vm, long id, TypeMirror type, AppDomainMirror domain) : base (vm, id, type, domain) { length = -1; } public string Value { get { return vm.conn.String_GetValue (id); } } // Since protocol version 2.10 public int Length { get { if (length == -1) length = vm.conn.String_GetLength (id); return length; } } // Since protocol version 2.10 public char[] GetChars (int index, int length) { // re-ordered to avoid possible integer overflow if (index > Length - length) throw new ArgumentException ( "index and length do not specify a valid range in string."); return vm.conn.String_GetChars (id, index, length); } } }