You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Provides an interface to create objects without needing reflection.
11
11
/// </summary>
12
+
/// <remarks>
13
+
/// In most cases the implementation will be created automatically by the source generator. In some advanced scenarios
14
+
/// the implementation may be created manually by the user see https://aka.ms/no-modelreaderwritertypebuilder-found for more details.
15
+
///
16
+
/// This class has no state and therefore the same instance can be used in multiple calls to <see cref="ModelReaderWriter"/>.
17
+
/// <see cref="ModelReaderWriterContext"/> will cache the <see cref="ModelReaderWriterTypeBuilder"/> instances for each type.
18
+
/// The state for collection building is maintained internally by <see cref="ModelReaderWriter"/> and is not needed to be maintained by the implementation.
19
+
/// The instance of the collection builder will be passed into each method that needs to modify that state such as <see cref="AddItem"/> and <see cref="AddItemWithKey"/>.
/// Gets an <see cref="IEnumerable"/> representation of the object.
62
+
/// Gets an <see cref="IEnumerable"/> representation of the passed in collection.
50
63
/// </summary>
64
+
/// <remarks>
65
+
/// This is only needed when the collection passed into <see cref="ModelReaderWriter.Write(object, ModelReaderWriterOptions, ModelReaderWriterContext)"/>
66
+
/// does not implement <see cref="IEnumerable"/>. In this case you must implement this method to return an <see cref="IEnumerable"/>.
67
+
/// </remarks>
51
68
/// <returns>An <see cref="IEnumerable"/> representation if its a collection otherwise null.</returns>
/// The collection builder instance that is being passed in is the instance returned from <see cref="CreateInstance"/>.
93
+
/// The state of the collection builder is maintained internally by <see cref="ModelReaderWriter"/> and is not needed to be maintained by the implementation.
94
+
/// </remarks>
95
+
/// <param name="collectionBuilder">Represents the collection builder to which the item will be added.</param>
96
+
/// <param name="item">Represents the item that will be added to the collection builder.</param>
=>Debug.Fail("AddItem should not be called for non-collections types.");
73
99
74
100
/// <summary>
75
-
/// Adds an item to a specified dictionary under the specified key.
101
+
/// Adds an item to the passed in collection builder under the specified key.
76
102
/// </summary>
77
-
/// <param name="collection">Represents the collection to which the item will be added.</param>
103
+
/// <remarks>
104
+
/// The collection builder instance that is being passed in is the instance returned from <see cref="CreateInstance"/>.
105
+
/// The state of the collection builder is maintained internally by <see cref="ModelReaderWriter"/> and is not needed to be maintained by the implementation.
106
+
/// </remarks>
107
+
/// <param name="collectionBuilder">Represents the collection builder to which the item will be added.</param>
78
108
/// <param name="key">Represents the key under which the item will be added.</param>
79
-
/// <param name="item">Represents the item that will be added to the collection.</param>
0 commit comments