Example #1
0
        public static void IncludeMethodsFromRealType(Attribute _attribute, Type _realType, params string[] _methodNames)
        {
            int _indexOf = AttributeClassMap
                           .IndexOf(AttributeClassMap
                                    .SingleOrDefault(i => i.RealType.GUID == _realType.GUID && i.AttributeObject.GetType().GUID == _attribute.GetType().GUID));

            AttributeToRealTypeMapper _resultRealTypeFromAttribute = null;

            if (_indexOf > -1)
            {
                _resultRealTypeFromAttribute = AttributeClassMap[_indexOf];
            }

            if (_resultRealTypeFromAttribute != null)
            {
                _resultRealTypeFromAttribute.Methods = AttributeClassMap[_indexOf].Methods.Where(x => _methodNames.Contains(x.Name)).ToArray();
            }
        }
 public void IncludeMethods(params string[] _methodNames)
 {
     AttributeToRealTypeMapper.IncludeMethodsFromRealType(AttributeObject, typeof(TClass), _methodNames);
 }