@@ -45,7 +45,7 @@ public interface ILibraryService
45
45
46
46
/// <summary>
47
47
/// Installs a library item into a target loadout.
48
- /// To remove an item, use <see cref="RemoveLinkedItemFromLoadout"/>.
48
+ /// To remove an installed item, use <see cref="RemoveLinkedItemFromLoadout"/>.
49
49
/// </summary>
50
50
/// <param name="libraryItem">The item to install.</param>
51
51
/// <param name="targetLoadout">The target loadout.</param>
@@ -75,82 +75,87 @@ IJobTask<IInstallLoadoutItemJob, InstallLoadoutItemJobResult> InstallItem(
75
75
Task RemoveLibraryItems ( IEnumerable < LibraryItem . ReadOnly > libraryItems , GarbageCollectorRunMode gcRunMode = GarbageCollectorRunMode . RunAsynchronously ) ;
76
76
77
77
/// <summary>
78
- /// Unlinks a single item added by <see cref="InstallItem"/> function call from a loadout.
78
+ /// Removes a single linked loadout item from its loadout,
79
+ /// managing the transaction automatically.
79
80
/// </summary>
80
- /// <param name="itemId">The <see cref="LibraryLinkedLoadoutItem"/> to remove from the loadout.</param>
81
+ /// <param name="itemId">The ID of the linked loadout item to remove from the loadout.</param>
81
82
Task RemoveLinkedItemFromLoadout ( LibraryLinkedLoadoutItemId itemId ) ;
82
83
83
84
/// <summary>
84
- /// Unlinks a number of items added by <see cref="InstallItem"/> function call from a loadout.
85
+ /// Removes multiple linked loadout items from their loadout,
86
+ /// managing the transaction automatically.
85
87
/// </summary>
86
- /// <param name="itemIds">The <see cref="LibraryLinkedLoadoutItem"/>s to remove from the loadout.</param>
88
+ /// <param name="itemIds">The IDs of the linked loadout items to remove from their loadout.</param>
87
89
Task RemoveLinkedItemsFromLoadout ( IEnumerable < LibraryLinkedLoadoutItemId > itemIds ) ;
88
90
89
91
/// <summary>
90
- /// Unlinks a single item added by <see cref="InstallItem"/> function call from a loadout.
92
+ /// Removes a single linked loadout item from a loadout,
93
+ /// using the provided transaction.
91
94
/// </summary>
92
- /// <param name="itemId">The <see cref="LibraryLinkedLoadoutItem"/>s to remove from the loadout.</param>
93
- /// <param name="tx">Existing transaction to use</param>
95
+ /// <param name="itemId">The ID of the linked loadout item to remove from its loadout.</param>
96
+ /// <param name="tx">Existing transaction to use for this operation. </param>
94
97
void RemoveLinkedItemFromLoadout ( LibraryLinkedLoadoutItemId itemId , ITransaction tx ) ;
95
98
96
99
/// <summary>
97
- /// Unlinks a number of items added by <see cref="InstallItem"/> function call from a loadout.
100
+ /// Removes multiple linked loadout items from their loadout,
101
+ /// using the provided transaction.
98
102
/// </summary>
99
- /// <param name="itemIds">The <see cref="LibraryLinkedLoadoutItem"/>s to remove</param>
100
- /// <param name="tx">Existing transaction to use</param>
103
+ /// <param name="itemIds">The IDs of the linked loadout items to remove from their loadout. </param>
104
+ /// <param name="tx">Existing transaction to use for this operation. </param>
101
105
void RemoveLinkedItemsFromLoadout ( IEnumerable < LibraryLinkedLoadoutItemId > itemIds , ITransaction tx ) ;
102
106
103
107
/// <summary>
104
- /// Removes library items (originally installed via <see cref="InstallItem"/>) from all
105
- /// loadouts using an existing transaction
108
+ /// Removes all linked loadout items from all loadouts,
109
+ /// using the provided transaction.
106
110
/// </summary>
107
- /// <param name="libraryItems">The library items to remove from the loadouts </param>
108
- /// <param name="tx">Existing transaction to use</param>
111
+ /// <param name="libraryItems">The library items whose associated linked loadout items should be removed. </param>
112
+ /// <param name="tx">Existing transaction to use for this operation. </param>
109
113
void RemoveLinkedItemsFromAllLoadouts ( IEnumerable < LibraryItem . ReadOnly > libraryItems , ITransaction tx ) ;
110
114
111
115
/// <summary>
112
- /// Removes library items (originally installed via <see cref="InstallItem"/>) from all
113
- /// loadouts with automatic transaction
116
+ /// Removes all linked loadout items from all loadouts,
117
+ /// managing the transaction automatically.
114
118
/// </summary>
115
- /// <param name="libraryItems">The library items to remove from the loadouts </param>
119
+ /// <param name="libraryItems">The library items whose associated linked loadout items should be removed. </param>
116
120
Task RemoveLinkedItemsFromAllLoadouts ( IEnumerable < LibraryItem . ReadOnly > libraryItems ) ;
117
121
118
122
/// <summary>
119
- /// Replaces all occurrences of a library item with a new version in all loadouts
123
+ /// Replaces linked loadout items across all loadouts with installations of a different library item.
120
124
/// </summary>
121
- /// <param name="oldItem">The library item to be replaced</param>
122
- /// <param name="newItem">The replacement library item</param>
123
- /// <param name="options">Options regarding how to replace this library item .</param>
124
- /// <param name="tx">The transaction to use</param>
125
+ /// <param name="oldItem">The library item whose linked loadout items should be replaced. </param>
126
+ /// <param name="newItem">The replacement library item from which to install the new linked loadout items from. </param>
127
+ /// <param name="options">Options controlling how to replace the linked loadout items .</param>
128
+ /// <param name="tx">The transaction to use for this operation. </param>
125
129
/// <returns>
126
- /// If an error occurs at any step of the way, this returns a 'fail' enum .
130
+ /// A result indicating success or failure of the replacement operation .
127
131
/// </returns>
128
- ValueTask < LibraryItemReplacementResult > ReplaceLinkedItemInAllLoadouts ( LibraryItem . ReadOnly oldItem , LibraryItem . ReadOnly newItem , ReplaceLibraryItemOptions options , ITransaction tx ) ;
132
+ ValueTask < LibraryItemReplacementResult > ReplaceLinkedItemsInAllLoadouts ( LibraryItem . ReadOnly oldItem , LibraryItem . ReadOnly newItem , ReplaceLibraryItemOptions options , ITransaction tx ) ;
129
133
130
134
/// <summary>
131
- /// Replaces all occurrences of a library item with a new version in all loadouts
135
+ /// Replaces multiple sets of linked loadout items across all loadouts with new versions.
132
136
/// </summary>
133
- /// <param name="replacements">The replacements to perform </param>
134
- /// <param name="options">Options regarding how to replace these library items.</param>
135
- /// <param name="tx">The transaction to add this replace operation to .</param>
137
+ /// <param name="replacements">The pairs of library items (old and new) whose linked loadout items should be replaced. </param>
138
+ /// <param name="options">Options controlling how to replace the linked loadout items.</param>
139
+ /// <param name="tx">The transaction to use for this operation.</param>
136
140
/// <returns>
137
- /// If an error occurs at any step of the way, this returns a 'fail' enum .
141
+ /// A result indicating success or failure of the replacement operation .
138
142
/// </returns>
139
143
ValueTask < LibraryItemReplacementResult > ReplaceLinkedItemsInAllLoadouts ( IEnumerable < ( LibraryItem . ReadOnly oldItem , LibraryItem . ReadOnly newItem ) > replacements , ReplaceLibraryItemsOptions options , ITransaction tx ) ;
140
144
141
145
/// <summary>
142
- /// Replaces all occurrences of a library item with a new version in all loadouts
146
+ /// Replaces multiple sets of linked loadout items across all loadouts with new versions,
147
+ /// managing the transaction automatically.
143
148
/// </summary>
144
- /// <param name="replacements">The replacements to perform </param>
145
- /// <param name="options">Options regarding how to replace this library item .</param>
149
+ /// <param name="replacements">The pairs of library items (old and new) whose linked loadout items should be replaced. </param>
150
+ /// <param name="options">Options controlling how to replace the linked loadout items .</param>
146
151
/// <returns>
147
- /// If an error occurs at any step of the way, this returns a 'fail' enum .
152
+ /// A result indicating success or failure of the replacement operation .
148
153
/// </returns>
149
154
ValueTask < LibraryItemReplacementResult > ReplaceLinkedItemsInAllLoadouts ( IEnumerable < ( LibraryItem . ReadOnly oldItem , LibraryItem . ReadOnly newItem ) > replacements , ReplaceLibraryItemsOptions options ) ;
150
155
}
151
156
152
157
/// <summary>
153
- /// Represents the result of a <see cref="ILibraryService.ReplaceLinkedItemInAllLoadouts "/> operation.
158
+ /// Represents the result of a <see cref="ILibraryService.ReplaceLinkedItemsInAllLoadouts(NexusMods.Abstractions.Library.Models.LibraryItem.ReadOnly,NexusMods.Abstractions.Library.Models.LibraryItem.ReadOnly,NexusMods.Abstractions.Library.ReplaceLibraryItemOptions,NexusMods.MnemonicDB.Abstractions.ITransaction) "/> operation.
154
159
/// </summary>
155
160
public enum LibraryItemReplacementResult
156
161
{
@@ -166,24 +171,24 @@ public enum LibraryItemReplacementResult
166
171
}
167
172
168
173
/// <summary>
169
- /// Options for the <see cref="ILibraryService.ReplaceLinkedItemInAllLoadouts "/>
174
+ /// Options for the <see cref="ILibraryService.ReplaceLinkedItemsInAllLoadouts(NexusMods.Abstractions.Library.Models.LibraryItem.ReadOnly,NexusMods.Abstractions.Library.Models.LibraryItem.ReadOnly,NexusMods.Abstractions.Library.ReplaceLibraryItemOptions,NexusMods.MnemonicDB.Abstractions.ITransaction) "/>
170
175
/// API.
171
176
/// </summary>
172
177
public struct ReplaceLibraryItemOptions
173
178
{
174
179
/// <summary>
175
- /// Ignores items in ReadOnly collections such as collections from Nexus Mods.
180
+ /// Skips items in ReadOnly collections such as collections from Nexus Mods.
176
181
/// </summary>
177
182
public bool IgnoreReadOnlyCollections { get ; set ; }
178
183
}
179
184
180
185
/// <summary>
181
- /// Options for the 'ReplaceLibraryItemsInAllLoadouts' API .
186
+ /// Options controlling how multiple sets of linked loadout items are replaced across loadouts .
182
187
/// </summary>
183
188
public struct ReplaceLibraryItemsOptions
184
189
{
185
190
/// <summary>
186
- /// Ignores items in ReadOnly collections such as collections from Nexus Mods.
191
+ /// Skips items in ReadOnly collections such as collections from Nexus Mods.
187
192
/// </summary>
188
193
public bool IgnoreReadOnlyCollections { get ; set ; }
189
194
0 commit comments