コード例 #1
0
ファイル: IProjectItem.cs プロジェクト: SiriusQuality/Release
        public static bool SetStruct <T>(this IProjectItem notifier, IProjectItem container, string propertyName, ref T newValue, string propertyNotifierName)
            where T : struct
        {
            var propertyInfo = container.GetType().GetProperty(propertyName);
            var oldValue     = (T)propertyInfo.GetValue(container, null);

            propertyInfo.SetValue(container, newValue, null);
            var result = notifier.SetStruct(ref oldValue, ref newValue, propertyNotifierName);

            return(result);
        }