Пример #1
0
        protected override void OnBeforeInit(int tag, ref DataFormat format)
        {
            innerProperty = PropertyFactory.CreatePassThru <TValue>(tag, ref format);
            MethodInfo addMethod = PropertyFactory.GetAddMethod(typeof(TList), typeof(TValue));

#if CF2
            add = delegate(TList source, TValue value) { addMethod.Invoke(source, new object[] { value }); };
#else
            add = (Setter <TList, TValue>)Delegate.CreateDelegate(typeof(Setter <TList, TValue>), null, addMethod);
#endif
            PropertyFactory.VerifyCanPack(innerProperty.WireType);
            base.OnBeforeInit(tag, ref format);
        }
 protected override void OnBeforeInit(int tag, ref DataFormat format)
 {
     innerProperty = PropertyFactory.CreatePassThru <TValue>(tag, ref format);
     PropertyFactory.VerifyCanPack(innerProperty.WireType);
     base.OnBeforeInit(tag, ref format);
 }