public MBeanInternalNotificationInfo(EventInfo eventInfo, IMBeanInfoFactory factory) { _handlerType = eventInfo.GetAddMethod().GetParameters()[0].ParameterType; _handlerGenericArgument = _handlerType.GetGenericArguments()[0]; if (_handlerType.GetGenericTypeDefinition() == typeof(EventHandler <>) && (typeof(Notification).IsAssignableFrom(_handlerGenericArgument) || typeof(NotificationEventArgs).IsAssignableFrom(_handlerGenericArgument))) { _notifInfo = factory.CreateMBeanNotificationInfo(eventInfo, _handlerType); } else { throw new NotCompliantMBeanException(eventInfo.DeclaringType.AssemblyQualifiedName); } _eventInfo = eventInfo; }
public MBeanInternalNotificationInfo(EventInfo eventInfo, IMBeanInfoFactory factory) { _handlerType = eventInfo.GetAddMethod().GetParameters()[0].ParameterType; _handlerGenericArgument = _handlerType.GetGenericArguments()[0]; if (_handlerType.GetGenericTypeDefinition() == typeof(EventHandler<>) && (typeof(Notification).IsAssignableFrom(_handlerGenericArgument) || typeof(NotificationEventArgs).IsAssignableFrom(_handlerGenericArgument))) { _notifInfo = factory.CreateMBeanNotificationInfo(eventInfo, _handlerType); } else { throw new NotCompliantMBeanException(eventInfo.DeclaringType.AssemblyQualifiedName); } _eventInfo = eventInfo; }
public MBeanInternalAttributeInfo(PropertyInfo propInfo, IMBeanInfoFactory factory) { _property = propInfo; _attributeInfo = factory.CreateMBeanAttributeInfo(propInfo); }
public MBeanInternalConstructorInfo(ConstructorInfo method, IMBeanInfoFactory factory) { _methodInfo = method; _constructorInfo = factory.CreateMBeanConstructorInfo(method); }
public MBeanInternalOperationInfo(MethodInfo method, IMBeanInfoFactory factory) { _methodInfo = method; _operationInfo = factory.CreateMBeanOperationInfo(method); }