/
EvilBeaver
/
OneScript
Обзор
Документация
Войти
/
EvilBeaver
/
OneScript
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
v2.0.3-alpha
src/OneScript.Native/Compiler/ReflectedPropertiesCache.cs
33 строки
986 B
EvilBeaver
Вызов методов объектов
25 апр 2021, 01:31
25 апр 2021, 01:31
0dd4317
Код
Авторство
О чём код?
/*---------------------------------------------------------- This Source Code Form is subject to the terms of the Mozilla Public License, v.2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. ----------------------------------------------------------*/ using System; using System.Reflection; namespace OneScript.Native.Compiler { public class ReflectedPropertiesCache : ReflectedMembersCache<PropertyInfo> { public ReflectedPropertiesCache() : base() { } public ReflectedPropertiesCache(int size): base(size) { } public override PropertyInfo GetOrAdd(Type type, string name) { return GetOrAdd(type, name, BindingFlags.Public | BindingFlags.Instance); } protected override PropertyInfo SearchImpl(Type type, string name, BindingFlags flags) { return type.GetProperty(name, flags); } } }