Пример #1
0
 static void architecture_AttributeProcessingEvent(object sender, AttributeProcessingArgs e)
 {
     if (_transformers.ContainsKey(e.OldAttribute.GetType()))
     {
         e.NewAttribute = _transformers[e.OldAttribute.GetType()]();
     }
 }
        private Attribute LaunchAttributeProcessingEvent(Int32 compositeID, Object reflectionElement, Attribute attribute)
        {
            Attribute result = attribute;
            EventHandler <AttributeProcessingArgs> evt = this.AttributeProcessingEvent;

            if (evt != null)
            {
                AttributeProcessingArgs args = new AttributeProcessingArgs(compositeID, reflectionElement, attribute);
                evt(this, args);
                result = args.NewAttribute;
            }
            return(result);
        }