Beispiel #1
0
 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;
 }
Beispiel #3
0
 public MBeanInternalAttributeInfo(PropertyInfo propInfo, IMBeanInfoFactory factory)
 {
     _property      = propInfo;
     _attributeInfo = factory.CreateMBeanAttributeInfo(propInfo);
 }
Beispiel #4
0
 public MBeanInternalConstructorInfo(ConstructorInfo method, IMBeanInfoFactory factory)
 {
     _methodInfo      = method;
     _constructorInfo = factory.CreateMBeanConstructorInfo(method);
 }
 public MBeanInternalAttributeInfo(PropertyInfo propInfo, IMBeanInfoFactory factory)
 {
     _property = propInfo;
      _attributeInfo = factory.CreateMBeanAttributeInfo(propInfo);
 }
 public MBeanInternalOperationInfo(MethodInfo method, IMBeanInfoFactory factory)
 {
     _methodInfo = method;
      _operationInfo = factory.CreateMBeanOperationInfo(method);
 }
 public MBeanInternalOperationInfo(MethodInfo method, IMBeanInfoFactory factory)
 {
     _methodInfo    = method;
     _operationInfo = factory.CreateMBeanOperationInfo(method);
 }
 public MBeanInternalConstructorInfo(ConstructorInfo method, IMBeanInfoFactory factory)
 {
     _methodInfo = method;
      _constructorInfo = factory.CreateMBeanConstructorInfo(method);
 }