@@ -21,11 +21,11 @@ public sealed class ProxyFactory
21
21
{
22
22
internal static readonly ConcurrentDictionary < ProxyCacheEntry , TypeInfo > _cache = new ConcurrentDictionary < ProxyCacheEntry , TypeInfo > ( ) ;
23
23
24
- private static readonly ConstructorInfo defaultBaseConstructor = typeof ( object ) . GetConstructor ( new System . Type [ 0 ] ) ;
24
+ internal static readonly ConstructorInfo defaultBaseConstructor = typeof ( object ) . GetConstructor ( new System . Type [ 0 ] ) ;
25
25
26
26
private static readonly MethodInfo getValue = ReflectHelper . GetMethod < SerializationInfo > (
27
27
si => si . GetValue ( null , null ) ) ;
28
- private static readonly MethodInfo setType = ReflectHelper . GetMethod < SerializationInfo > (
28
+ internal static readonly MethodInfo setType = ReflectHelper . GetMethod < SerializationInfo > (
29
29
si => si . SetType ( null ) ) ;
30
30
private static readonly MethodInfo addValue = ReflectHelper . GetMethod < SerializationInfo > (
31
31
si => si . AddValue ( null , null ) ) ;
@@ -129,7 +129,7 @@ private TypeInfo CreateUncachedProxyType(System.Type baseType, IReadOnlyCollecti
129
129
return proxyType ;
130
130
}
131
131
132
- private IEnumerable < MethodInfo > GetProxiableMethods ( System . Type type , IEnumerable < System . Type > interfaces )
132
+ internal static IEnumerable < MethodInfo > GetProxiableMethods ( System . Type type , IEnumerable < System . Type > interfaces )
133
133
{
134
134
const BindingFlags candidateMethodsBindingFlags = BindingFlags . Public | BindingFlags . NonPublic | BindingFlags . Instance ;
135
135
return
@@ -139,7 +139,7 @@ private IEnumerable<MethodInfo> GetProxiableMethods(System.Type type, IEnumerabl
139
139
. Distinct ( ) ;
140
140
}
141
141
142
- private static ConstructorBuilder DefineConstructor ( TypeBuilder typeBuilder , System . Type parentType )
142
+ internal static ConstructorBuilder DefineConstructor ( TypeBuilder typeBuilder , System . Type parentType )
143
143
{
144
144
const MethodAttributes constructorAttributes = MethodAttributes . Public |
145
145
MethodAttributes . HideBySig | MethodAttributes . SpecialName |
@@ -166,7 +166,7 @@ private static ConstructorBuilder DefineConstructor(TypeBuilder typeBuilder, Sys
166
166
return constructor ;
167
167
}
168
168
169
- private static void ImplementGetObjectData ( System . Type baseType , IReadOnlyCollection < System . Type > baseInterfaces , TypeBuilder typeBuilder , FieldInfo interceptorField )
169
+ internal static void ImplementGetObjectData ( System . Type baseType , IReadOnlyCollection < System . Type > baseInterfaces , TypeBuilder typeBuilder , FieldInfo interceptorField )
170
170
{
171
171
const MethodAttributes attributes = MethodAttributes . Public | MethodAttributes . HideBySig |
172
172
MethodAttributes . Virtual ;
@@ -217,7 +217,7 @@ private static void ImplementGetObjectData(System.Type baseType, IReadOnlyCollec
217
217
IL . Emit ( OpCodes . Ret ) ;
218
218
}
219
219
220
- private static void DefineSerializationConstructor ( TypeBuilder typeBuilder , FieldInfo interceptorField , ConstructorBuilder defaultConstructor )
220
+ internal static void DefineSerializationConstructor ( TypeBuilder typeBuilder , FieldInfo interceptorField , ConstructorBuilder defaultConstructor )
221
221
{
222
222
const MethodAttributes constructorAttributes = MethodAttributes . Public |
223
223
MethodAttributes . HideBySig | MethodAttributes . SpecialName |
@@ -254,7 +254,7 @@ private static void DefineSerializationConstructor(TypeBuilder typeBuilder, Fiel
254
254
IL . Emit ( OpCodes . Ret ) ;
255
255
}
256
256
257
- private static void AddSerializationSupport ( System . Type baseType , IReadOnlyCollection < System . Type > baseInterfaces , TypeBuilder typeBuilder , FieldInfo interceptorField , ConstructorBuilder defaultConstructor )
257
+ internal static void AddSerializationSupport ( System . Type baseType , IReadOnlyCollection < System . Type > baseInterfaces , TypeBuilder typeBuilder , FieldInfo interceptorField , ConstructorBuilder defaultConstructor )
258
258
{
259
259
ConstructorInfo serializableConstructor = typeof ( SerializableAttribute ) . GetConstructor ( new System . Type [ 0 ] ) ;
260
260
var customAttributeBuilder = new CustomAttributeBuilder ( serializableConstructor , new object [ 0 ] ) ;
0 commit comments