public CurrentItemStateAdaptor(CurrentItemState <TSource> sourceState, Func <TSource, TResult> direct, Func <TResult, TSource> reverse) { this.reverse = reverse; this.direct = direct; this.sourceState = sourceState; this.Item = direct(sourceState.Item); sourceState.ItemChangedEx += new CurrentItemState <TSource> .EventHandlerEx(sourceState_ItemChangedEx); ItemChanged += new EventHandler(CurrentItemStateAdaptor_ItemChanged); }
public CurrentItemStateAdaptor(CurrentItemState <TSource> sourceState, Func <TSource, TResult> direct) : this(sourceState, direct, null) { }