Ejemplo n.º 1
0
        public static ApiKind CheckMemberKind(ITypeDefinitionMember member)
        {
            ApiKind kind;

            if (_kindMapping.TryGetValue(member.GetType(), out kind))
            {
                return(kind);
            }

            return(ApiKind.Other);
        }
Ejemplo n.º 2
0
        public static ITypeDefinitionMember ResolveMemberThrowing(ITypeMemberReference memberRef)
        {
            ITypeDefinitionMember result = memberRef.ResolvedTypeDefinitionMember;

            if (result == Dummy.Method ||
                result == Dummy.Field ||
                result == Dummy.Event ||
                result == Dummy.Property ||
                result == null)
            {
                throw new Exception(String.Format("Cannot resolve member '{0}'. Are all dependent assemblies loaded?", memberRef.ToString()));
            }

            Debug.Assert(!result.GetType().Name.Contains("Dummy"));
            return(result);
        }