@@ -21,11 +21,11 @@ public sealed class ProxyFactory
2121 {
2222 internal static readonly ConcurrentDictionary < ProxyCacheEntry , TypeInfo > _cache = new ConcurrentDictionary < ProxyCacheEntry , TypeInfo > ( ) ;
2323
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 ] ) ;
2525
2626 private static readonly MethodInfo getValue = ReflectHelper . GetMethod < SerializationInfo > (
2727 si => si . GetValue ( null , null ) ) ;
28- private static readonly MethodInfo setType = ReflectHelper . GetMethod < SerializationInfo > (
28+ internal static readonly MethodInfo setType = ReflectHelper . GetMethod < SerializationInfo > (
2929 si => si . SetType ( null ) ) ;
3030 private static readonly MethodInfo addValue = ReflectHelper . GetMethod < SerializationInfo > (
3131 si => si . AddValue ( null , null ) ) ;
@@ -129,7 +129,7 @@ private TypeInfo CreateUncachedProxyType(System.Type baseType, IReadOnlyCollecti
129129 return proxyType ;
130130 }
131131
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 )
133133 {
134134 const BindingFlags candidateMethodsBindingFlags = BindingFlags . Public | BindingFlags . NonPublic | BindingFlags . Instance ;
135135 return
@@ -139,7 +139,7 @@ private IEnumerable<MethodInfo> GetProxiableMethods(System.Type type, IEnumerabl
139139 . Distinct ( ) ;
140140 }
141141
142- private static ConstructorBuilder DefineConstructor ( TypeBuilder typeBuilder , System . Type parentType )
142+ internal static ConstructorBuilder DefineConstructor ( TypeBuilder typeBuilder , System . Type parentType )
143143 {
144144 const MethodAttributes constructorAttributes = MethodAttributes . Public |
145145 MethodAttributes . HideBySig | MethodAttributes . SpecialName |
@@ -166,7 +166,7 @@ private static ConstructorBuilder DefineConstructor(TypeBuilder typeBuilder, Sys
166166 return constructor ;
167167 }
168168
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 )
170170 {
171171 const MethodAttributes attributes = MethodAttributes . Public | MethodAttributes . HideBySig |
172172 MethodAttributes . Virtual ;
@@ -217,7 +217,7 @@ private static void ImplementGetObjectData(System.Type baseType, IReadOnlyCollec
217217 IL . Emit ( OpCodes . Ret ) ;
218218 }
219219
220- private static void DefineSerializationConstructor ( TypeBuilder typeBuilder , FieldInfo interceptorField , ConstructorBuilder defaultConstructor )
220+ internal static void DefineSerializationConstructor ( TypeBuilder typeBuilder , FieldInfo interceptorField , ConstructorBuilder defaultConstructor )
221221 {
222222 const MethodAttributes constructorAttributes = MethodAttributes . Public |
223223 MethodAttributes . HideBySig | MethodAttributes . SpecialName |
@@ -254,7 +254,7 @@ private static void DefineSerializationConstructor(TypeBuilder typeBuilder, Fiel
254254 IL . Emit ( OpCodes . Ret ) ;
255255 }
256256
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 )
258258 {
259259 ConstructorInfo serializableConstructor = typeof ( SerializableAttribute ) . GetConstructor ( new System . Type [ 0 ] ) ;
260260 var customAttributeBuilder = new CustomAttributeBuilder ( serializableConstructor , new object [ 0 ] ) ;
0 commit comments