프로젝트

일반

사용자정보

개정판 1c7f408a

ID1c7f408ad2bb4679a5dd52e4bc7b7388ffba0ad1
상위 2b83fdb9
하위 60f874fe

김태성이(가) 약 5년 전에 추가함

mainWindow를 RadWindow로 변경

Change-Id: I0ac468f572b53cd39e832aed20e7d350b5c03d42

차이점 보기:

KCOM/Extensions/CollectionExtenstions.cs
171 171

  
172 172
        /// <summary>
173 173
        /// Update all elements of IEnumerable by the update function (only works with reference types)
174
        /// where the where function returns true
175 174
        /// </summary>
176 175
        /// <param name="enumerable">The enumerable where you want to change stuff</param>
177
        /// <param name="update">The way you want to change the stuff</param>
178
        /// <param name="where">The function to check where updates should be made</param>
176
        /// <param name="Find">T와 동일한 첫번째 Item을 찾는다. 없으면 null을 반환</param>
179 177
        /// <returns>
180 178
        /// The same enumerable you passed in
181 179
        /// </returns>
182
        public static IEnumerable<T> UpdateWhere<T>(this IEnumerable<T> enumerable,
180
        public static T Find<T>(this IEnumerable<T> enumerable, Func<T, bool> where) where T : class
181
        {
182
            T result = null;
183

  
184
            foreach (var item in enumerable)
185
            {
186
                if (where(item))
187
                {
188
                    result = item;
189
                }
190
            }
191

  
192
            return result;
193
        }
194

  
195
            /// <summary>
196
            /// Update all elements of IEnumerable by the update function (only works with reference types)
197
            /// where the where function returns true
198
            /// </summary>
199
            /// <param name="enumerable">The enumerable where you want to change stuff</param>
200
            /// <param name="update">The way you want to change the stuff</param>
201
            /// <param name="where">The function to check where updates should be made</param>
202
            /// <returns>
203
            /// The same enumerable you passed in
204
            /// </returns>
205
            public static IEnumerable<T> UpdateWhere<T>(this IEnumerable<T> enumerable,
183 206
                                               Action<T> update, Func<T, bool> where) where T : class
184 207
        {
185 208
            ArgumentCheck.IsNullorWhiteSpace(enumerable, "enumerable");

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)