Ejemplo n.º 1
0
        public WeakEventForwarder(IRowEventProvider source, IRowEventClient client)
        {
            if (source == null) throw new ArgumentNullException("source");
            if (client == null) throw new ArgumentNullException("client");

            this.source = source;
            this.clientRef = new WeakReference<IRowEventClient>(client);

            if (source.SourceTable != null) //RowListBinders might not have tables
                source.SourceTable.LoadCompleted += SourceTable_LoadCompleted;
            source.Schema.SchemaChanged += Schema_SchemaChanged;

            source.RowAdded += source_RowAdded;
            source.ValueChanged += source_ValueChanged;
            source.RowRemoved += source_RowRemoved;
        }
Ejemplo n.º 2
0
        public WeakEventForwarder(IRowEventProvider source, IRowEventClient client)
        {
            if (source == null)
            {
                throw new ArgumentNullException("source");
            }
            if (client == null)
            {
                throw new ArgumentNullException("client");
            }

            this.source    = source;
            this.clientRef = new WeakReference <IRowEventClient>(client);

            if (source.SourceTable != null)             //RowListBinders might not have tables
            {
                source.SourceTable.LoadCompleted += SourceTable_LoadCompleted;
            }
            source.Schema.SchemaChanged += Schema_SchemaChanged;

            source.RowAdded     += source_RowAdded;
            source.ValueChanged += source_ValueChanged;
            source.RowRemoved   += source_RowRemoved;
        }