Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mcs/class/System.ServiceModel/System.ServiceModel.Description/DataContractSerializerOperationBehavior.cs')
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.Description/DataContractSerializerOperationBehavior.cs21
1 files changed, 20 insertions, 1 deletions
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Description/DataContractSerializerOperationBehavior.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Description/DataContractSerializerOperationBehavior.cs
index ba801cf27cd..58f421e75f1 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel.Description/DataContractSerializerOperationBehavior.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel.Description/DataContractSerializerOperationBehavior.cs
@@ -26,9 +26,11 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
+using System.Collections.Generic;
using System.Runtime.Serialization;
using System.ServiceModel.Channels;
using System.ServiceModel.Dispatcher;
+using System.Xml;
namespace System.ServiceModel.Description
{
@@ -41,6 +43,7 @@ namespace System.ServiceModel.Description
{
format = new DataContractFormatAttribute ();
this.operation = operation;
+ MaxItemsInObjectGraph = int.MaxValue;
}
public DataContractSerializerOperationBehavior (
@@ -49,17 +52,33 @@ namespace System.ServiceModel.Description
{
this.format = dataContractFormatAttribute;
this.operation = operation;
+ MaxItemsInObjectGraph = int.MaxValue;
}
public DataContractFormatAttribute DataContractFormatAttribute {
get { return format; }
}
+ public bool IgnoreExtensionDataObject { get; set; }
+
+ public int MaxItemsInObjectGraph { get; set; }
+
+ public IDataContractSurrogate DataContractSurrogate { get; set; }
+
+ public virtual XmlObjectSerializer CreateSerializer (Type type, string name, string ns, IList<Type> knownTypes)
+ {
+ return new DataContractSerializer (type, name, ns, knownTypes, MaxItemsInObjectGraph, IgnoreExtensionDataObject, false, DataContractSurrogate);
+ }
+
+ public virtual XmlObjectSerializer CreateSerializer (Type type, XmlDictionaryString name, XmlDictionaryString ns, IList<Type> knownTypes)
+ {
+ return new DataContractSerializer (type, name, ns, knownTypes, MaxItemsInObjectGraph, IgnoreExtensionDataObject, false, DataContractSurrogate);
+ }
+
void IOperationBehavior.AddBindingParameters (
OperationDescription description,
BindingParameterCollection parameters)
{
- throw new NotImplementedException ();
}
void IOperationBehavior.ApplyDispatchBehavior (