Skip to content

Predicates.ForService 里面获取的类不全,导致无法aop #315

@asuoghs

Description

@asuoghs
   config.Interceptors.AddTyped<TimerInterceptorAttribute>((AspectPredicate)(method =>
                {
                    Type declaringType = method.DeclaringType;
                    string name = declaringType.Name;
                    if (declaringType.IsGenericType)
                        name = name.Split('`')[0];
                    Console.WriteLine("Class:" + name);
                    return name.Matches("*DCache") ||
                           (declaringType.FullName ?? declaringType.Name + "." + declaringType.Name).Matches(
                               "*DCache");
                }));
                输出的class发现不全,导致无法aop

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions