11// ***********************************************************************
22// Assembly : RzR.Shared.Extensions.TryToExecute
33// Author : RzR
4- // Created On : 2024-12-04 14:53
4+ // Created On : 2024-12-04 20:49
55//
66// Last Modified By : RzR
7- // Last Modified On : 2024-12-04 14:53
7+ // Last Modified On : 2025-01-20 15:43
88// ***********************************************************************
99// <copyright file="TryCatchExecuteStaticBase.cs" company="RzR SOFT & TECH">
1010// Copyright © RzR. All rights reserved.
1414// </summary>
1515// ***********************************************************************
1616
17+ #region U S A G E S
18+
19+ using TryToExecute . Helpers ;
20+
21+ #endregion
22+
1723namespace TryToExecute . CodeExec
1824{
1925 /// -------------------------------------------------------------------------------------------------
@@ -23,5 +29,74 @@ namespace TryToExecute.CodeExec
2329 /// =================================================================================================
2430 public partial class TryCatchExecuteStaticBase
2531 {
32+ /// -------------------------------------------------------------------------------------------------
33+ /// <summary>
34+ /// Sets to default if present.
35+ /// </summary>
36+ /// <typeparam name="T1">Generic type parameter.</typeparam>
37+ /// <param name="item">[in,out] The item.</param>
38+ /// =================================================================================================
39+ protected static void SetToDefaultIfPresent < T1 > ( ref T1 item )
40+ => RefTypeParamHelper . ToDefaultValue ( ref item ) ;
41+
42+ /// -------------------------------------------------------------------------------------------------
43+ /// <summary>
44+ /// Sets to default if present.
45+ /// </summary>
46+ /// <typeparam name="T1">Generic type parameter.</typeparam>
47+ /// <typeparam name="T2">Generic type parameter.</typeparam>
48+ /// <param name="item1">[in,out] The first item.</param>
49+ /// <param name="item2">[in,out] The second item.</param>
50+ /// =================================================================================================
51+ protected static void SetToDefaultIfPresent < T1 , T2 > ( ref T1 item1 , ref T2 item2 )
52+ => RefTypeParamHelper . ToDefaultValue ( ref item1 , ref item2 ) ;
53+
54+ /// -------------------------------------------------------------------------------------------------
55+ /// <summary>
56+ /// Sets to default if present.
57+ /// </summary>
58+ /// <typeparam name="T1">Generic type parameter.</typeparam>
59+ /// <typeparam name="T2">Generic type parameter.</typeparam>
60+ /// <typeparam name="T3">Generic type parameter.</typeparam>
61+ /// <param name="item1">[in,out] The first item.</param>
62+ /// <param name="item2">[in,out] The second item.</param>
63+ /// <param name="item3">[in,out] The third item.</param>
64+ /// =================================================================================================
65+ protected static void SetToDefaultIfPresent < T1 , T2 , T3 > ( ref T1 item1 , ref T2 item2 , ref T3 item3 )
66+ => RefTypeParamHelper . ToDefaultValue ( ref item1 , ref item2 , ref item3 ) ;
67+
68+ /// -------------------------------------------------------------------------------------------------
69+ /// <summary>
70+ /// Sets to default if present.
71+ /// </summary>
72+ /// <typeparam name="T1">Generic type parameter.</typeparam>
73+ /// <typeparam name="T2">Generic type parameter.</typeparam>
74+ /// <typeparam name="T3">Generic type parameter.</typeparam>
75+ /// <typeparam name="T4">Generic type parameter.</typeparam>
76+ /// <param name="item1">[in,out] The first item.</param>
77+ /// <param name="item2">[in,out] The second item.</param>
78+ /// <param name="item3">[in,out] The third item.</param>
79+ /// <param name="item4">[in,out] The fourth item.</param>
80+ /// =================================================================================================
81+ protected static void SetToDefaultIfPresent < T1 , T2 , T3 , T4 > ( ref T1 item1 , ref T2 item2 , ref T3 item3 , ref T4 item4 )
82+ => RefTypeParamHelper . ToDefaultValue ( ref item1 , ref item2 , ref item3 , ref item4 ) ;
83+
84+ /// -------------------------------------------------------------------------------------------------
85+ /// <summary>
86+ /// Sets to default if present.
87+ /// </summary>
88+ /// <typeparam name="T1">Generic type parameter.</typeparam>
89+ /// <typeparam name="T2">Generic type parameter.</typeparam>
90+ /// <typeparam name="T3">Generic type parameter.</typeparam>
91+ /// <typeparam name="T4">Generic type parameter.</typeparam>
92+ /// <typeparam name="T5">Generic type parameter.</typeparam>
93+ /// <param name="item1">[in,out] The first item.</param>
94+ /// <param name="item2">[in,out] The second item.</param>
95+ /// <param name="item3">[in,out] The third item.</param>
96+ /// <param name="item4">[in,out] The fourth item.</param>
97+ /// <param name="item5">[in,out] The fourth item.</param>
98+ /// =================================================================================================
99+ protected static void SetToDefaultIfPresent < T1 , T2 , T3 , T4 , T5 > ( ref T1 item1 , ref T2 item2 , ref T3 item3 , ref T4 item4 , ref T5 item5 )
100+ => RefTypeParamHelper . ToDefaultValue ( ref item1 , ref item2 , ref item3 , ref item4 , ref item5 ) ;
26101 }
27102}
0 commit comments