Example #1
0
 private MemberInfo GetMember(Type type, ScriptAccessType accesstype)
 {
     foreach (MemberInfo member in type.GetMembers(BindingFlags.Public | BindingFlags.Instance))
     {
         foreach (ScriptableAttribute attribute in member.GetCustomAttributes(typeof(ScriptableAttribute), false))
         {
             if ((attribute.Name ?? member.Name) != membername)
             {
                 continue;
             }
             if ((attribute.AccessType & accesstype) != accesstype)
             {
                 continue;
             }
             return(member);
         }
     }
     throw new ApplicationException();
 }
Example #2
0
 private MemberInfo GetMember(Type type,ScriptAccessType accesstype)
 {
     foreach (MemberInfo member in type.GetMembers(BindingFlags.Public | BindingFlags.Instance))
     {
         foreach (ScriptableAttribute attribute in member.GetCustomAttributes(typeof(ScriptableAttribute),false))
         {
             if ((attribute.Name ?? member.Name) != membername)
                 continue;
             if ((attribute.AccessType & accesstype) != accesstype)
                 continue;
             return member;
         }
     }
     throw new ApplicationException();
 }
 public ScriptableAttribute(ScriptAccessType accesstype)
 {
     this.accesstype = accesstype;
     this.name = null;
 }
Example #4
0
 public ScriptableAttribute(ScriptAccessType accesstype)
 {
     this.accesstype = accesstype;
     this.name       = null;
 }