forked from pakrym/jab
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDiagnosticDescriptors.cs
More file actions
92 lines (71 loc) · 6.47 KB
/
Copy pathDiagnosticDescriptors.cs
File metadata and controls
92 lines (71 loc) · 6.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
namespace Jab;
#pragma warning disable RS2000
internal static class DiagnosticDescriptors
{
public static readonly DiagnosticDescriptor UnexpectedErrorDescriptor = new("JAB0001",
"Unexpected error during generation",
"Unexpected error occurred during code generation: {0}", "Usage", DiagnosticSeverity.Error, true);
public static readonly DiagnosticDescriptor ServiceRequiredToConstructNotRegistered = new("JAB0002",
"The service registration not found",
"The service '{0}' required to construct '{1}' is not registered", "Usage", DiagnosticSeverity.Error, true);
public static readonly DiagnosticDescriptor MemberReferencedByInstanceOrFactoryAttributeNotFound = new("JAB0003",
"A member referenced by instance or factory attribute not found",
"Unable to find a member '{0}', referenced by '{1}' attribute parameter", "Usage", DiagnosticSeverity.Error, true);
public static readonly DiagnosticDescriptor MemberReferencedByInstanceOrFactoryAttributeAmbiguous = new("JAB0004",
"Found multiple members referenced by instance or factory attribute",
"Found multiple members with the '{0}' name, referenced in the '{1}' attribute parameter", "Usage", DiagnosticSeverity.Error, true);
public static readonly DiagnosticDescriptor ServiceProviderTypeHasToBePartial = new("JAB0005",
"The type marked with the ServiceProvider attribute has to be marked partial",
"The type '{0}' marked with the ServiceProvider attribute has to be marked partial", "Usage", DiagnosticSeverity.Error, true);
public static readonly DiagnosticDescriptor ImportedTypeNotMarkedWithModuleAttribute = new("JAB0006",
"The imported type has to be marked with the ServiceProviderModule attribute",
"The imported type '{0}' has to be marked with the '{1}'", "Usage", DiagnosticSeverity.Error, true);
public static readonly DiagnosticDescriptor ImplementationTypeRequiresPublicConstructor = new("JAB0007",
"The implementation type is required to have at least one public constructor",
"The implementation type '{0}' is required to have at least one public constructor", "Usage", DiagnosticSeverity.Error, true);
public static readonly DiagnosticDescriptor CyclicDependencyDetected = new("JAB0008",
"A cyclic dependency detected when resolving a service",
"A cyclic dependency detected when resolving a service '{0}', dependency chain: '{1}'", "Usage", DiagnosticSeverity.Error, true);
public static readonly DiagnosticDescriptor MissingServiceProviderAttribute = new("JAB0009",
"A type contains service registrations but no ServiceProvider or ServiceProviderModule attribute",
"The type '{0}' contains service registration but is missing ServiceProvider or ServiceProviderModule attribute", "Usage", DiagnosticSeverity.Error, true);
public static readonly DiagnosticDescriptor NoServiceTypeRegistered = new("JAB0010",
"The service registration not found",
"The service type '{0}' is not registered", "Usage", DiagnosticSeverity.Error, true);
public static readonly DiagnosticDescriptor ImplementationTypeAndFactoryNotAllowed = new("JAB0011",
"Can't specify both the implementation type and factory/instance",
"Can't specify both the implementation type and factory/instance, for service '{0}'", "Usage", DiagnosticSeverity.Error, true);
public static readonly DiagnosticDescriptor FactoryMemberMustBeAMethodOrHaveDelegateType = new("JAB0012",
"The factory member has to be a method or have a delegate type",
"The factory member '{0}' has to be a method of have a delegate type, for service '{1}'", "Usage", DiagnosticSeverity.Error, true);
public static readonly DiagnosticDescriptor ServiceNameMustBeAlphanumeric = new("JAB0015",
"Service name must be alphanumeric",
"Service name '{0}' must be non-empty, alphanumeric and start with a letter.", "Usage", DiagnosticSeverity.Error, true);
public static readonly DiagnosticDescriptor BuiltInServicesAreNotNamed = new("JAB0016",
"Built-in provider services can not be named",
"Built-in service '{0}' can not be named", "Usage", DiagnosticSeverity.Error, true);
public static readonly DiagnosticDescriptor ImplicitIEnumerableNotNamed = new("JAB0017",
"Implicit IEnumerable<> services can not be named",
"Implicit IEnumerable service '{0}' can not be named", "Usage", DiagnosticSeverity.Error, true);
public static readonly DiagnosticDescriptor NoServiceTypeAndNameRegistered = new("JAB0018",
"The service registration not found",
"The service type '{0}' and name '{1}' is not registered", "Usage", DiagnosticSeverity.Error, true);
public static readonly DiagnosticDescriptor NamedServiceRequiredToConstructNotRegistered = new("JAB0019",
"The named service registration not found",
"The service '{0}' with name '{1}' required to construct '{2}' is not registered", "Usage", DiagnosticSeverity.Error, true);
public static readonly DiagnosticDescriptor OnlyStringKeysAreSupported = new("JAB0020",
"Only string service keys are supported",
"Service key '{0}' is not supported, only string keys are supported", "Usage", DiagnosticSeverity.Error, true);
public static readonly DiagnosticDescriptor ResolveDelegateServiceNotRegistered = new("JAB0021",
"Resolve delegate requires registered service",
"Resolve delegate requires the service '{0}' to be registered", "Usage", DiagnosticSeverity.Error, true);
public static readonly DiagnosticDescriptor NamedResolveDelegateServiceNotRegistered = new("JAB0022",
"NamedResolve delegate requires named service registration",
"NamedResolve delegate requires the service '{0}' to be registered with a name", "Usage", DiagnosticSeverity.Error, true);
public static readonly DiagnosticDescriptor NullableServiceNotRegistered = new("JAB0013",
"Not registered nullable dependency without a default value",
"The nullable service '{0}' requested to construct '{1}' is not registered. Add a default value to make the service reference optional", "Usage", DiagnosticSeverity.Error, true);
public static readonly DiagnosticDescriptor NullableServiceRegistered = new("JAB0014",
"Nullable dependency without a default value",
"'{0}' parameter to construct '{1}' will never be null when constructing using a service provider. Add a default value to make the service reference optional", "Usage", DiagnosticSeverity.Info, true);
}