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
Copy file name to clipboardExpand all lines: src/Internal/SR.cs
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -59,7 +59,6 @@ static partial class SR
59
59
60
60
publicconststringHttpRequestEventSource_KeepAliveDisposed="Cannot keep alive an instance that has it's connection disposed.";
61
61
62
-
publicconststringRouter_AutoScanModules_RequiresUnreferencedCode="This method needs to search for types in your assembly, which can be trimmed in an AOT compilation.";
63
62
publicconststringRouter_AutoScanModules_TModuleSameAssembly="The TModule generic type must be a type that implements RouterModule and not RouterModule itself.";
64
63
publicconststringRouter_Set_Collision="A possible route collision could happen between route {0} and route {1}. Please review the methods and paths of these routes.";
65
64
publicconststringRouter_Set_Exception="Couldn't set method {0}.{1} as an route. See inner exception.";
@@ -101,6 +100,9 @@ static partial class SR
101
100
102
101
publicconststringCollection_ReadOnly="Cannot insert items to this collection as it is read-only.";
103
102
103
+
publicconststringRequiresUnreferencedCode="This method requires access to unreferenced code, which may break AOT compilation and trimming.";
104
+
publicconststringRequiresUnreferencedCode__RouterSetObject="This method requires access to unreferenced code, which may break AOT compilation and trimming. Use the SetObject(Type, Object) or SetObject<TObject>(TObject) overloads instead.";
/// <param name="attrClassInstance">The instance of the class where the methods are. The routing methods must be marked with any <see cref="RouteAttribute"/>.</param>
275
275
/// <exception cref="Exception">An exception is thrown when a method has an erroneous signature.</exception>
@@ -286,13 +287,25 @@ public void SetObject(object attrClassInstance)
286
287
/// for these methods.
287
288
/// </summary>
288
289
/// <param name="attrClassType">The type of the class where the methods are. The routing methods must be marked with any <see cref="RouteAttribute"/>.</param>
289
-
/// <exception cref="Exception">An exception is thrown when a method has an erroneous signature.</exception>
/// Searches for all instance and static methods that are marked with an attribute of
298
+
/// type <see cref="RouteAttribute"/> in the specified object and creates routes
299
+
/// for these methods.
300
+
/// </summary>
301
+
/// <param name="attrClassType">The type of the class where the methods are. The routing methods must be marked with any <see cref="RouteAttribute"/>.</param>
302
+
/// <param name="instance">The instance of the object where the route methods are.</param>
/// Searches for all instance and static methods that are marked with an attribute of
298
311
/// type <see cref="RouteAttribute"/> in the specified object and creates routes
@@ -305,6 +318,19 @@ public void SetObject([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes
305
318
this.SetObject(typeof(TObject));
306
319
}
307
320
321
+
/// <summary>
322
+
/// Searches for all instance and static methods that are marked with an attribute of
323
+
/// type <see cref="RouteAttribute"/> in the specified object and creates routes
324
+
/// for these methods.
325
+
/// </summary>
326
+
/// <param name="instance">The instance of <typeparamref name="TObject"/> to invoke the instance methods on.</param>
327
+
/// <typeparam name="TObject">The type of the class where the methods are. The routing methods must be marked with any <see cref="RouteAttribute"/>.</typeparam>
328
+
/// <exception cref="Exception">An exception is thrown when a method has an erroneous signature.</exception>
0 commit comments