Esempio n. 1
0
    public void ProcessType(TypeDefinition type)
    {
        if (!type.HasMethods)
        {
            return;
        }

        foreach (var method in type.Methods)
        {
            if (SharedAnnotation.Get(context, method) is SharedAnnotation annotation && annotation.Mark)
            {
                context.Annotations.Mark(method);
            }
        }
    }
Esempio n. 2
0
    public void ProcessType(TypeDefinition type)
    {
        if (!type.HasMethods)
        {
            return;
        }

        foreach (var method in type.Methods)
        {
            if (method.Name == "MarkedMethod")
            {
                SharedAnnotation.Set(context, method, new SharedAnnotation()
                {
                    Mark = true
                });
            }
        }
    }
Esempio n. 3
0
 public static void Set(LinkContext context, MethodDefinition method, SharedAnnotation value)
 {
     context.Annotations.SetCustomAnnotation(nameof(SharedAnnotation), method, value);
 }