forked from kzu/InjectModuleInitializer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathErrors.cs
67 lines (54 loc) · 2.27 KB
/
Errors.cs
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
/*
InjectModuleInitializer
Command line program to inject a module initializer into a .NET assembly.
Copyright (C) 2009-2016 Einar Egilsson
http://einaregilsson.com/module-initializers-in-csharp/
This program is licensed under the MIT license: http://opensource.org/licenses/MIT
*/
using System;
namespace EinarEgilsson.Utilities.InjectModuleInitializer
{
internal static class Errors
{
internal static string AssemblyDoesNotExist(string assembly)
{
return String.Format("Assembly '{0}' does not exist", assembly);
}
internal static string NoModuleInitializerTypeFound()
{
return "Found no type named 'ModuleInitializer', this type must exist or the ModuleInitializer parameter must be used";
}
internal static string InvalidFormatForModuleInitializer()
{
return "Invalid format for ModuleInitializer parameter, use Full.Type.Name::MethodName";
}
internal static string TypeNameDoesNotExist(string typeName)
{
return string.Format("No type named '{0}' exists in the given assembly!", typeName);
}
internal static string MethodNameDoesNotExist(string typeName, string methodName)
{
return string.Format("No method named '{0}' exists in the type '{0}'", methodName, typeName);
}
internal static string KeyFileDoesNotExist(string keyfile)
{
return string.Format("The key file'{0}' does not exist", keyfile);
}
internal static string ModuleInitializerMayNotBePrivate()
{
return "Module initializer method may not be private or protected, use public or internal instead";
}
internal static string ModuleInitializerMustBeVoid()
{
return "Module initializer method must have 'void' as return type";
}
internal static string ModuleInitializerMayNotHaveParameters()
{
return "Module initializer method must not have any parameters";
}
internal static string ModuleInitializerMustBeStatic()
{
return "Module initializer method must be static";
}
}
}