IronPython.Runtime.Types.ReflectedField.TryGetValue C# (CSharp) Метод

TryGetValue() приватный Метод

private TryGetValue ( Microsoft.Scripting.CodeContext context, object instance, IronPython.Runtime.Types.PythonType owner, object &value ) : bool
context Microsoft.Scripting.CodeContext
instance object
owner IronPython.Runtime.Types.PythonType
value object
Результат bool
        internal override bool TryGetValue(CodeContext context, object instance, PythonType owner, out object value) {
            PerfTrack.NoteEvent(PerfTrack.Categories.Fields, this);
            if (instance == null) {
                if (_info.IsStatic) {
                    value = _info.GetValue(null);
                } else {
                    value = this;
                }
            } else {
                value = _info.GetValue(context.LanguageContext.Binder.Convert(instance, _info.DeclaringType));
            }

            return true;
        }