Exemple #1
0
 /// <summary>
 /// Get attached decorators of, or derived from, the specified type.
 /// </summary>
 public TDecorator[] GetDecorators <TDecorator>() where TDecorator : SmartDecoratorBase
 {
     PopulateTempDecorators(typeof(TDecorator), _decorators, true);
     TDecorator[] results = new TDecorator[_tempDecoratorCount];
     FillResultDecorators(results);
     return(results);
 }
Exemple #2
0
        //-----------------------------------------------------------------------------------------------------------------------------------------------------

        public ClassWriterBase DecorateWith <TDecorator>() where TDecorator : DecorationConvention, new()
        {
            var decorator        = new TDecorator();
            var decoratingWriter = new DecoratingClassWriter(m_OwnerClass, decorator);

            return(this);
        }