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); } } }
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 }); } } }
public static void Set(LinkContext context, MethodDefinition method, SharedAnnotation value) { context.Annotations.SetCustomAnnotation(nameof(SharedAnnotation), method, value); }