rspec/rules/S3885/csharp/rule.adoc

29 lines
746 B
Plaintext
Raw Normal View History

2021-04-28 16:49:39 +02:00
The parameter to ``++Assembly.Load++`` includes the full specification of the dll to be loaded. Use another method, and you might end up with a dll other than the one you expected.
This rule raises an issue when ``++Assembly.LoadFrom++``, ``++Assembly.LoadFile++``, or ``++Assembly.LoadWithPartialName++`` is called.
2021-04-28 16:49:39 +02:00
== Noncompliant Code Example
----
static void Main(string[] args)
{
Assembly.LoadFrom(...); // Noncompliant
Assembly.LoadFile(...); // Noncompliant
Assembly.LoadWithPartialName(...); // Noncompliant + deprecated
}
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::message.adoc[]
include::highlighting.adoc[]
endif::env-github,rspecator-view[]