public SubscriptionEndMessageBody(SubscriptionManager manager, SubscriptionEndCode status, String reason = null) { Contract.Requires <ArgumentNullException>(manager != null, "manager"); this.manager = manager; this.status = status; this.reason = reason; }
internal static void WriteXml(this SubscriptionEndCode code, XmlWriter writer) { switch (code) { case SubscriptionEndCode.DeliveryFailure: writer.WriteValue("http://schemas.xmlsoap.org/ws/2004/08/eventing/DeliveryFailure"); break; case SubscriptionEndCode.SourceCancelling: writer.WriteValue("http://schemas.xmlsoap.org/ws/2004/08/eventing/SourceCancelling"); break; case SubscriptionEndCode.SourceShuttingDown: writer.WriteValue("http://schemas.xmlsoap.org/ws/2004/08/eventing/SourceShuttingDown"); break; } }