示例#1
0
        public static string GetClassification(this DocumentedMember member)
        {
            var classification = member.Classification;

            if (classification == MemberClassification.Type)
            {
                var type = member as DocumentedType;
                if (type != null)
                {
                    return(type.TypeClassification.ToString());
                }
                throw new InvalidOperationException();
            }
            if (classification == MemberClassification.Method)
            {
                var method = member as DocumentedMethod;
                if (method != null)
                {
                    bool isPropertyAlias;
                    if (method.IsCakeAlias(out isPropertyAlias))
                    {
                        return(@"Extension Method (Cake Alias)");
                    }
                    return(method.MethodClassification.ToString());
                }
                throw new InvalidOperationException();
            }
            return(classification.ToString());
        }
示例#2
0
        public static bool IsCakeAlias(this DocumentedMember member, out bool isPropertyAlias)
        {
            var method = member as DocumentedMethod;

            if (method != null)
            {
                if (IsCakeAlias(method.Definition, out isPropertyAlias))
                {
                    return(true);
                }
            }
            isPropertyAlias = false;
            return(false);
        }