Xamarin Public Jenkins (auto-signing) e79aa3c0ed Imported Upstream version 4.6.0.125
Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
2016-08-03 10:59:49 +00:00

38 lines
1.4 KiB
C#

namespace System.Workflow.ComponentModel.Serialization
{
using System;
using System.Reflection;
using System.Xml;
using System.ComponentModel.Design.Serialization;
using System.Collections;
using System.Workflow.ComponentModel.Design;
using System.ComponentModel;
#region Class PropertySegmentSerializationProvider
internal sealed class PropertySegmentSerializationProvider : WorkflowMarkupSerializationProvider
{
#region IDesignerSerializationProvider Members
public override object GetSerializer(IDesignerSerializationManager manager, object currentSerializer, Type objectType, Type serializerType)
{
if (serializerType.IsAssignableFrom(typeof(WorkflowMarkupSerializer)))
{
if (currentSerializer is PropertySegmentSerializer)
return currentSerializer;
else if (objectType == typeof(PropertySegment))
return new PropertySegmentSerializer(null);
else if (currentSerializer is WorkflowMarkupSerializer)
return new PropertySegmentSerializer(currentSerializer as WorkflowMarkupSerializer);
else
return null;
}
else
{
return base.GetSerializer(manager, currentSerializer, objectType, serializerType);
}
}
#endregion
}
#endregion
}