Esempio n. 1
0
        internal static IEnumerable <AnalyzerTreeNodeData> CheckCustomAttributeNamedArgumentWrite(IAnalyzerTreeNodeDataContext context, TypeDef type, IMemberRef member)
        {
            bool isField = member.IsField;

            if (HasWrite(type, member, isField))
            {
                yield return new TypeNode(type)
                       {
                           Context = context
                       }
            }
            ;
            foreach (var method in type.Methods)
            {
                if (HasWrite(method, member, isField))
                {
                    yield return new MethodNode(method)
                           {
                               Context = context
                           }
                }
                ;

                foreach (var pd in method.ParamDefs)
                {
                    if (HasWrite(pd, member, isField))
                    {
                        yield return new MethodNode(method)
                               {
                                   Context = context
                               }
                    }
                    ;
                }
            }
            foreach (var field in type.Fields)
            {
                if (HasWrite(field, member, isField))
                {
                    yield return new FieldNode(field)
                           {
                               Context = context
                           }
                }
                ;
            }
            foreach (var property in type.Properties)
            {
                if (HasWrite(property, member, isField))
                {
                    yield return new PropertyNode(property)
                           {
                               Context = context
                           }
                }
                ;
            }
            foreach (var @event in type.Events)
            {
                if (HasWrite(@event, member, isField))
                {
                    yield return new EventNode(@event)
                           {
                               Context = context
                           }
                }
                ;
            }
        }
Esempio n. 2
0
 internal static IEnumerable <AnalyzerTreeNodeData> CheckCustomAttributeNamedArgumentWrite(IAnalyzerTreeNodeDataContext context, ModuleDef module, IMemberRef member)
 {
     if (HasWrite(module, member, member.IsField))
     {
         yield return new ModuleNode(module)
                {
                    Context = context
                }
     }
     ;
 }
 public MessageNode(IAnalyzerTreeNodeDataContext context) => this.context = context;
Esempio n. 4
0
 internal static IEnumerable <AnalyzerTreeNodeData> CheckCustomAttributeNamedArgumentWrite(IAnalyzerTreeNodeDataContext context, AssemblyDef asm, IMemberRef member)
 {
     if (TryGetCAWrite(asm, member, member.IsField, out var ca))
     {
         yield return new AssemblyNode(asm)
                {
                    Context = context
                }
     }
     ;
 }
			public MessageNode(IAnalyzerTreeNodeDataContext context) {
				this.context = context;
			}