Class RequiresServerAttribute
Skips the test unless the host is composed with the named ASP.NET Core server, for example the
instance registered by AddAspNetCoreServer<TProgram>(name). The check addresses the
capability's Instance - the server name - so a configured
address that drops one named server does not satisfy a gate for another.
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Method, AllowMultiple = true, Inherited = true)]
public sealed class RequiresServerAttribute : RequiresCapabilityAttribute, IProtoSkipCondition
- Inheritance
-
RequiresServerAttribute
- Implements
- Inherited Members
- Extension Methods
Examples
[RequiresServer("Api")]
public async Task ...() { ... }
Constructors
RequiresServerAttribute(string)
public RequiresServerAttribute(string name)
Parameters
namestring
Properties
DefaultReason
protected override string DefaultReason { get; }
Property Value
ServerName
The server name the test needs.
public string ServerName { get; }