File tree Expand file tree Collapse file tree 4 files changed +21
-4
lines changed Expand file tree Collapse file tree 4 files changed +21
-4
lines changed Original file line number Diff line number Diff line change
1
+ #if FEATURE_REMOTING
2
+
1
3
using System ;
2
4
using System . Collections ;
3
5
using System . Runtime . Remoting . Messaging ;
@@ -36,4 +38,6 @@ protected override IDictionary GetMap()
36
38
return CallContext . GetData ( SessionFactoryMapKey ) as IDictionary ;
37
39
}
38
40
}
39
- }
41
+ }
42
+
43
+ #endif
Original file line number Diff line number Diff line change
1
+ #if FEATURE_SYSTEM_SERVICEMODEL
2
+
1
3
using System ;
2
4
using System . Collections ;
3
5
using System . ServiceModel ;
@@ -49,4 +51,6 @@ public class WcfStateExtension : IExtension<OperationContext>
49
51
public void Attach ( OperationContext owner ) { }
50
52
public void Detach ( OperationContext owner ) { }
51
53
}
52
- }
54
+ }
55
+
56
+ #endif
Original file line number Diff line number Diff line change @@ -1239,14 +1239,18 @@ private ICurrentSessionContext BuildCurrentSessionContext()
1239
1239
{
1240
1240
case null :
1241
1241
return null ;
1242
+ #if FEATURE_REMOTING
1242
1243
case "call" :
1243
1244
return new CallSessionContext ( this ) ;
1245
+ #endif
1244
1246
case "thread_static" :
1245
1247
return new ThreadStaticSessionContext ( this ) ;
1246
1248
case "web" :
1247
1249
return new WebSessionContext ( this ) ;
1250
+ #if FEATURE_REMOTING
1248
1251
case "wcf_operation" :
1249
1252
return new WcfOperationSessionContext ( this ) ;
1253
+ #endif
1250
1254
}
1251
1255
1252
1256
try
Original file line number Diff line number Diff line change @@ -10,7 +10,9 @@ public static class DefaultDynamicProxyMethodCheckerExtensions
10
10
public static bool IsProxiable ( this MethodInfo method )
11
11
{
12
12
return ! method . IsFinal
13
+ #if FEATURE_REMOTING
13
14
& & ( method . DeclaringType != typeof ( MarshalByRefObject ) )
15
+ #endif
14
16
&& ( method . DeclaringType != typeof ( object ) || ! "finalize" . Equals ( method . Name . ToLowerInvariant ( ) ) )
15
17
&&
16
18
(
@@ -23,7 +25,10 @@ public static bool IsProxiable(this MethodInfo method)
23
25
public static bool ShouldBeProxiable ( this MethodInfo method )
24
26
{
25
27
// to use only for real methods (no getter/setter)
26
- return ( method . DeclaringType != typeof ( MarshalByRefObject ) ) &&
28
+ return
29
+ #if FEATURE_REMOTING
30
+ ( method . DeclaringType != typeof ( MarshalByRefObject ) ) &&
31
+ #endif
27
32
( method . DeclaringType != typeof ( object ) || ! "finalize" . Equals ( method . Name . ToLowerInvariant ( ) ) ) &&
28
33
( ! ( method . DeclaringType == typeof ( object ) && "GetType" . Equals ( method . Name ) ) ) &&
29
34
( ! ( method . DeclaringType == typeof ( object ) && "obj_address" . Equals ( method . Name ) ) ) && // Mono-specific method
@@ -48,4 +53,4 @@ private static bool IsDisposeMethod(MethodInfo method)
48
53
// return method.Name.Equals("Dispose") && method.IsMethodOf(typeof(IDisposable));
49
54
}
50
55
}
51
- }
56
+ }
You can’t perform that action at this time.
0 commit comments