public EventDefinition(EventInfo memberInfo, ClassDefinitionBase declaringClass, MethodDefinition addMethod, MethodDefinition removeMethod)
            : base(memberInfo, declaringClass)
        {
            ArgumentUtility.CheckNotNull("addMethod", addMethod);
            ArgumentUtility.CheckNotNull("removeMethod", removeMethod);

            _addMethod    = addMethod;
            _removeMethod = removeMethod;

            _addMethod.Parent    = this;
            _removeMethod.Parent = this;
        }
        public PropertyDefinition(PropertyInfo memberInfo, ClassDefinitionBase declaringClass, MethodDefinition getMethod, MethodDefinition setMethod)
            : base(memberInfo, declaringClass)
        {
            _getMethod = getMethod;
            _setMethod = setMethod;

            if (_getMethod != null)
            {
                _getMethod.Parent = this;
            }
            if (_setMethod != null)
            {
                _setMethod.Parent = this;
            }
        }
Beispiel #3
0
        protected MemberDefinitionBase(MemberInfo memberInfo, ClassDefinitionBase declaringClass)
        {
            ArgumentUtility.CheckNotNull("memberInfo", memberInfo);
            ArgumentUtility.CheckNotNull("declaringClass", declaringClass);

            SuppressedReceivedAttributes = new MultiDefinitionCollection <Type, SuppressedAttributeIntroductionDefinition> (a => a.AttributeType);
            ReceivedAttributes           = new MultiDefinitionCollection <Type, AttributeIntroductionDefinition> (a => a.AttributeType);
            CustomAttributes             = new MultiDefinitionCollection <Type, AttributeDefinition> (a => a.AttributeType);

            SuppressedAttributeIntroductions = new MultiDefinitionCollection <Type, SuppressedAttributeIntroductionDefinition> (a => a.AttributeType);
            NonAttributeIntroductions        = new MultiDefinitionCollection <Type, NonAttributeIntroductionDefinition> (a => a.AttributeType);
            AttributeIntroductions           = new MultiDefinitionCollection <Type, AttributeIntroductionDefinition> (a => a.AttributeType);

            MemberInfo     = memberInfo;
            DeclaringClass = declaringClass;
            _parent        = declaringClass;
        }
Beispiel #4
0
 public MethodDefinition(MethodInfo memberInfo, ClassDefinitionBase declaringClass)
     : base(memberInfo, declaringClass)
 {
 }