Example #1
0
        public static string GetDisplayName(this TypeSystemEntity entity)
        {
            return(entity switch
            {
                MethodDesc method => method.GetDisplayName(),
                FieldDesc field => field.GetDisplayName(),
                TypeDesc type => type.GetDisplayName(),
#if !READYTORUN
                PropertyPseudoDesc property => property.GetDisplayName(),
                EventPseudoDesc @event => @event.GetDisplayName(),
#endif
                _ => throw new InvalidOperationException(),
            });
Example #2
0
 public static string GetDisplayName(this PropertyPseudoDesc property)
 {
     return(new StringBuilder(property.OwningType.GetDisplayName())
            .Append('.')
            .Append(property.Name).ToString());
 }