Example #1
0
        public AddAttributeProcessor(ConfigurationType configuration, ILogger logger)
            : base(configuration, logger)
        {
            attributeInjector = new AttributeInjector(configuration.CustomAttributeProvider);

            // AddSupportedComponent(ProcessableComponentType.Assembly);
            // AddSupportedComponent(ProcessableComponentType.Module);
            // AddSupportedComponent(ProcessableComponentType.Type);
            // AddSupportedComponent(ProcessableComponentType.Field);
            // AddSupportedComponent(ProcessableComponentType.Property);
            AddSupportedComponent(ProcessableComponentType.Method);

            // AddSupportedComponent(ProcessableComponentType.MethodParameter);
        }
 public static void RegisterAttributes()
 {
     AttributeInjector.Inject(typeof(bool), new NativeBool());
     AttributeInjector.Inject(typeof(sbyte), new NativeSByte());
     AttributeInjector.Inject(typeof(byte), new NativeByte());
     AttributeInjector.Inject(typeof(short), new NativeShort());
     AttributeInjector.Inject(typeof(ushort), new NativeUShort());
     AttributeInjector.Inject(typeof(int), new NativeInt());
     AttributeInjector.Inject(typeof(uint), new NativeUInt());
     AttributeInjector.Inject(typeof(long), new NativeLong());
     AttributeInjector.Inject(typeof(ulong), new NativeULong());
     AttributeInjector.Inject(typeof(double), new NativeDouble());
     AttributeInjector.Inject(typeof(float), new NativeFloat());
 }
Example #3
0
 /// <summary>
 /// Registers the rewriter with the AttributeInjector, for calls of the Delegate.Invoke method.
 /// </summary>
 internal static void Register()
 {
     AttributeInjector.InjectMethodByNameAttr(typeof(Delegate), "Invoke", new ResolveDelegateCalls(), true);
 }