diff --git a/src/System.ServiceModel.Primitives/ref/System.ServiceModel.Primitives.cs b/src/System.ServiceModel.Primitives/ref/System.ServiceModel.Primitives.cs index c44a0ae27c5..0c0d078a018 100644 --- a/src/System.ServiceModel.Primitives/ref/System.ServiceModel.Primitives.cs +++ b/src/System.ServiceModel.Primitives/ref/System.ServiceModel.Primitives.cs @@ -503,6 +503,7 @@ public FaultContractAttribute(System.Type detailType) { } public partial class FaultException : System.ServiceModel.CommunicationException { public FaultException() { } + public FaultException(string reason) { } public FaultException(System.ServiceModel.Channels.MessageFault fault, string action) { } public FaultException(System.ServiceModel.FaultReason reason, System.ServiceModel.FaultCode code, string action) { } protected FaultException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } diff --git a/src/System.ServiceModel.Primitives/tests/ServiceModel/FaultExceptionTest.cs b/src/System.ServiceModel.Primitives/tests/ServiceModel/FaultExceptionTest.cs index 63e78b88e37..98651226d38 100644 --- a/src/System.ServiceModel.Primitives/tests/ServiceModel/FaultExceptionTest.cs +++ b/src/System.ServiceModel.Primitives/tests/ServiceModel/FaultExceptionTest.cs @@ -47,4 +47,15 @@ public static void Serializable_Default() Assert.Equal(netfxBsl, sr.ReadToEnd()); } } + + [WcfFact] + public static void Ctor_StringReason() + { + string reason = "Fault reason"; + var exception = new FaultException(reason); + Assert.NotNull(exception); + Assert.NotNull(exception.Reason); + Assert.NotNull(exception.Code); + Assert.Equal(reason, exception.Reason.ToString()); + } }