Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Helpers.cs « tests « System.Reflection.TypeExtensions « src - github.com/mono/corefx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8eb59b17998574c7d57e2da513cdb25d80b4ee02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

namespace System.Reflection.Tests
{
    public class Helpers
    {
        private const BindingFlags AllFlags = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance;

        public static EventInfo GetEvent(Type type, string name) => type.GetEvent(name, AllFlags);
        public static FieldInfo GetField(Type type, string name) => type.GetField(name, AllFlags);
    }
}