コード例 #1
0
        public PropertyCouple(PropertyCouple <T1, T2> couple)
        {
            this._PropName1 = couple._PropName1;
            this._PropName2 = couple._PropName2;

            this._PropertyConverter1 = couple._PropertyConverter1;
            this._PropertyConverter2 = couple._PropertyConverter2;

            this._Covertor1Info = couple._Covertor1Info;
            this._Covertor2Info = couple._Covertor2Info;
        }
コード例 #2
0
        public PropertyCouple(string name1, string name2, PropertyConverter1 propertyConverter1, PropertyConverter2 propertyConverter2)
        {
            _PropName1 = name1;
            _PropName2 = name2;

            _PropertyConverter1 = propertyConverter1;
            _PropertyConverter2 = propertyConverter2;

            if (this.HasConverter)
            {
                _Covertor1Info = this.GetType().GetMethod("Convert", new Type[] { typeof(T1).MakeByRefType(), typeof(T2).MakeByRefType() });
                _Covertor2Info = this.GetType().GetMethod("Convert", new Type[] { typeof(T2).MakeByRefType(), typeof(T1).MakeByRefType() });
            }
        }