1
- // Smdn.Reflection.ReverseGenerating.dll (Smdn.Reflection.ReverseGenerating-1.0.5 )
1
+ // Smdn.Reflection.ReverseGenerating.dll (Smdn.Reflection.ReverseGenerating-1.1.0 )
2
2
// Name: Smdn.Reflection.ReverseGenerating
3
- // AssemblyVersion: 1.0.5 .0
4
- // InformationalVersion: 1.0.5+dd9591cbed8623f61349f46c833f14f1578db406
3
+ // AssemblyVersion: 1.1.0 .0
4
+ // InformationalVersion: 1.1.0+074a83ab64ee9e829c2f3835cf0c03af8af0f59d
5
5
// TargetFramework: .NETFramework,Version=v4.5
6
6
// Configuration: Release
7
7
8
8
using System ;
9
9
using System . Collections . Generic ;
10
10
using System . Reflection ;
11
+ using System . Runtime . CompilerServices ;
11
12
using Smdn . Reflection ;
12
13
using Smdn . Reflection . ReverseGenerating ;
13
14
14
15
namespace Smdn . Reflection . ReverseGenerating {
15
16
public delegate bool AttributeTypeFilter ( Type type , ICustomAttributeProvider attributeProvider ) ;
16
17
18
+ public enum AttributeSectionFormat : int {
19
+ Discrete = 1 ,
20
+ List = 0 ,
21
+ }
22
+
17
23
public enum MethodBodyOption : int {
18
24
EmptyImplementation = 1 ,
19
25
None = 0 ,
20
26
ThrowNotImplementedException = 2 ,
27
+ ThrowNull = 3 ,
21
28
}
22
29
30
+ [ Nullable ( byte . MinValue ) ]
31
+ [ NullableContext ( 1 ) ]
23
32
public static class CSharpFormatter {
24
33
public static string EscapeString ( string s , bool escapeSingleQuote = false , bool escapeDoubleQuote = false ) { }
25
34
public static string FormatAccessibility ( Accessibility accessibility ) { }
26
35
public static string FormatParameter ( ParameterInfo p , bool typeWithNamespace = true , bool useDefaultLiteral = false ) { }
27
36
public static string FormatParameterList ( MethodBase m , bool typeWithNamespace = true , bool useDefaultLiteral = false ) { }
28
37
public static string FormatParameterList ( ParameterInfo [ ] parameterList , bool typeWithNamespace = true , bool useDefaultLiteral = false ) { }
29
38
public static string FormatSpecialNameMethod ( MethodBase methodOrConstructor , out MethodSpecialName nameType ) { }
30
- public static string FormatTypeName ( this Type t , ICustomAttributeProvider attributeProvider = null , bool typeWithNamespace = true , bool withDeclaringTypeName = true , bool translateLanguagePrimitiveType = true ) { }
31
- public static string FormatValueDeclaration ( object val , Type typeOfValue , bool typeWithNamespace = true , bool findConstantField = false , bool useDefaultLiteral = false ) { }
39
+ public static string FormatTypeName ( this EventInfo ev , bool typeWithNamespace = true , bool withDeclaringTypeName = true , bool translateLanguagePrimitiveType = true ) { }
40
+ public static string FormatTypeName ( this FieldInfo f , bool typeWithNamespace = true , bool withDeclaringTypeName = true , bool translateLanguagePrimitiveType = true ) { }
41
+ public static string FormatTypeName ( this ParameterInfo p , bool typeWithNamespace = true , bool withDeclaringTypeName = true , bool translateLanguagePrimitiveType = true ) { }
42
+ public static string FormatTypeName ( this PropertyInfo p , bool typeWithNamespace = true , bool withDeclaringTypeName = true , bool translateLanguagePrimitiveType = true ) { }
43
+ public static string FormatTypeName ( this Type t , [ Nullable ( 2 ) ] ICustomAttributeProvider attributeProvider = null , bool typeWithNamespace = true , bool withDeclaringTypeName = true , bool translateLanguagePrimitiveType = true ) { }
44
+ public static string FormatValueDeclaration ( [ Nullable ( 2 ) ] object val , Type typeOfValue , bool typeWithNamespace = true , bool findConstantField = false , bool useDefaultLiteral = false ) { }
32
45
public static bool IsLanguagePrimitiveType ( Type t , out string primitiveTypeName ) { }
33
46
public static IEnumerable < string > ToNamespaceList ( Type t ) { }
34
47
}
35
48
49
+ [ Nullable ( byte . MinValue ) ]
50
+ [ NullableContext ( 1 ) ]
36
51
public static class Generator {
37
- public static IEnumerable < string > GenerateAttributeList ( ICustomAttributeProvider attributeProvider , ISet < string > referencingNamespaces , GeneratorOptions options ) { }
38
- public static IEnumerable < string > GenerateExplicitBaseTypeAndInterfaces ( Type t , ISet < string > referencingNamespaces , GeneratorOptions options ) { }
39
- public static string GenerateGenericArgumentConstraintDeclaration ( Type genericArgument , ISet < string > referencingNamespaces , GeneratorOptions options ) { }
40
- public static string GenerateMemberDeclaration ( MemberInfo member , ISet < string > referencingNamespaces , GeneratorOptions options ) { }
41
- public static string GenerateTypeDeclaration ( Type t , ISet < string > referencingNamespaces , GeneratorOptions options ) { }
42
- public static IEnumerable < string > GenerateTypeDeclarationWithExplicitBaseTypeAndInterfaces ( Type t , ISet < string > referencingNamespaces , GeneratorOptions options ) { }
52
+ public static IEnumerable < string > GenerateAttributeList ( ICustomAttributeProvider attributeProvider , [ Nullable ] ISet < string > referencingNamespaces , GeneratorOptions options ) { }
53
+ public static IEnumerable < string > GenerateExplicitBaseTypeAndInterfaces ( Type t , [ Nullable ] ISet < string > referencingNamespaces , GeneratorOptions options ) { }
54
+ public static string GenerateGenericArgumentConstraintDeclaration ( Type genericArgument , [ Nullable ] ISet < string > referencingNamespaces , GeneratorOptions options ) { }
55
+ [ return : Nullable ( 2 ) ] public static string GenerateMemberDeclaration ( MemberInfo member , [ Nullable ] ISet < string > referencingNamespaces , GeneratorOptions options ) { }
56
+ public static string GenerateTypeDeclaration ( Type t , [ Nullable ] ISet < string > referencingNamespaces , GeneratorOptions options ) { }
57
+ public static IEnumerable < string > GenerateTypeDeclarationWithExplicitBaseTypeAndInterfaces ( Type t , [ Nullable ] ISet < string > referencingNamespaces , GeneratorOptions options ) { }
43
58
}
44
59
45
- public class GeneratorOptions {
60
+ [ Nullable ( byte . MinValue ) ]
61
+ [ NullableContext ( 1 ) ]
62
+ public class GeneratorOptions : ICloneable {
63
+ [ Nullable ( byte . MinValue ) ]
64
+ [ NullableContext ( 2 ) ]
46
65
public class AttributeDeclarationOptions {
47
66
public AttributeDeclarationOptions ( ) { }
48
67
68
+ public AttributeSectionFormat AccessorFormat { get ; set ; }
69
+ public AttributeSectionFormat AccessorParameterFormat { get ; set ; }
70
+ public AttributeSectionFormat BackingFieldFormat { get ; set ; }
71
+ public AttributeSectionFormat DelegateParameterFormat { get ; set ; }
72
+ public AttributeSectionFormat GenericParameterFormat { get ; set ; }
73
+ public AttributeSectionFormat MethodParameterFormat { get ; set ; }
74
+ public bool OmitAttributeSuffix { get ; set ; }
49
75
public AttributeTypeFilter TypeFilter { get ; set ; }
76
+ public bool WithDeclaringTypeName { get ; set ; }
50
77
public bool WithNamedArguments { get ; set ; }
51
78
public bool WithNamespace { get ; set ; }
52
79
}
53
80
81
+ [ NullableContext ( byte . MinValue ) ]
54
82
public class MemberDeclarationOptions {
55
83
public MemberDeclarationOptions ( ) { }
56
84
85
+ public MethodBodyOption AccessorBody { get ; set ; }
57
86
public MethodBodyOption MethodBody { get ; set ; }
58
87
public bool OmitEndOfStatement { get ; set ; }
59
88
public bool WithAccessibility { get ; set ; }
60
89
public bool WithDeclaringTypeName { get ; set ; }
61
90
public bool WithNamespace { get ; set ; }
62
91
}
63
92
93
+ [ NullableContext ( byte . MinValue ) ]
94
+ public class ParameterDeclarationOptions {
95
+ public ParameterDeclarationOptions ( ) { }
96
+
97
+ public bool WithDeclaringTypeName { get ; set ; }
98
+ public bool WithNamespace { get ; set ; }
99
+ }
100
+
101
+ [ NullableContext ( byte . MinValue ) ]
64
102
public class TypeDeclarationOptions {
65
103
public TypeDeclarationOptions ( ) { }
66
104
@@ -70,21 +108,29 @@ public TypeDeclarationOptions() {}
70
108
public bool WithNamespace { get ; set ; }
71
109
}
72
110
111
+ [ NullableContext ( byte . MinValue ) ]
73
112
public class ValueDeclarationOptions {
74
113
public ValueDeclarationOptions ( ) { }
75
114
76
115
public bool UseDefaultLiteral { get ; set ; }
116
+ public bool WithDeclaringTypeName { get ; set ; }
117
+ public bool WithNamespace { get ; set ; }
77
118
}
78
119
79
120
public GeneratorOptions ( ) { }
80
121
81
- public GeneratorOptions . AttributeDeclarationOptions AttributeDeclaration { get ; }
122
+ public GeneratorOptions . AttributeDeclarationOptions AttributeDeclaration { get ; init ; }
82
123
public bool IgnorePrivateOrAssembly { get ; set ; }
124
+ [ Nullable ( 2 ) ]
83
125
public string Indent { get ; set ; }
84
- public GeneratorOptions . MemberDeclarationOptions MemberDeclaration { get ; }
126
+ public GeneratorOptions . MemberDeclarationOptions MemberDeclaration { get ; init ; }
127
+ public GeneratorOptions . ParameterDeclarationOptions ParameterDeclaration { get ; init ; }
85
128
public bool TranslateLanguagePrimitiveTypeDeclaration { get ; set ; }
86
- public GeneratorOptions . TypeDeclarationOptions TypeDeclaration { get ; }
87
- public GeneratorOptions . ValueDeclarationOptions ValueDeclaration { get ; }
129
+ public GeneratorOptions . TypeDeclarationOptions TypeDeclaration { get ; init ; }
130
+ public GeneratorOptions . ValueDeclarationOptions ValueDeclaration { get ; init ; }
131
+
132
+ public virtual GeneratorOptions Clone ( ) { }
133
+ object ICloneable . Clone ( ) { }
88
134
}
89
135
}
90
136
0 commit comments