bool _strictBinding = false;
IDictionary _properties;
-#if NET_1_1
- TypeFilterLevel _filterLevel = TypeFilterLevel.Low;
-#endif
-
- public static BinaryCore DefaultInstance = new BinaryCore ();
+ TypeFilterLevel _filterLevel;
+ public static BinaryCore DefaultInstance = new BinaryCore (TypeFilterLevel.Low);
+ public static readonly BinaryCore DefaultClientInstance = new BinaryCore (TypeFilterLevel.Full);
+
public BinaryCore (object owner, IDictionary properties, string[] allowedProperties)
{
_properties = properties;
_strictBinding = Convert.ToBoolean (property.Value);
break;
-#if NET_1_1
case "typeFilterLevel":
if (property.Value is TypeFilterLevel)
_filterLevel = (TypeFilterLevel) property.Value;
_filterLevel = (TypeFilterLevel) Enum.Parse (typeof(TypeFilterLevel), s);
}
break;
-#endif
}
}
Init ();
}
- public BinaryCore ()
+ public BinaryCore (TypeFilterLevel filterLevel)
{
+ _filterLevel = filterLevel;
_properties = new Hashtable ();
Init ();
}
RemotingSurrogateSelector surrogateSelector = new RemotingSurrogateSelector ();
StreamingContext context = new StreamingContext (StreamingContextStates.Remoting, null);
-#if !TARGET_JVM
_serializationFormatter = new BinaryFormatter (surrogateSelector, context);
_deserializationFormatter = new BinaryFormatter (null, context);
-#else
- _serializationFormatter = (BinaryFormatter) vmw.@internal.remoting.BinaryFormatterUtils.CreateBinaryFormatter (surrogateSelector, context, false);
- _deserializationFormatter = (BinaryFormatter) vmw.@internal.remoting.BinaryFormatterUtils.CreateBinaryFormatter (null, context, false);
-#endif
-#if NET_1_1
_serializationFormatter.FilterLevel = _filterLevel;
_deserializationFormatter.FilterLevel = _filterLevel;
-#endif
if (!_includeVersions)
{
get { return _properties; }
}
-#if NET_1_1
public TypeFilterLevel TypeFilterLevel
{
get { return _filterLevel; }
}
-#endif
}
}