protected void ValidateFramingMode(FramingMode mode)
 {
     switch (mode)
     {
         case FramingMode.Singleton:
         case FramingMode.Duplex:
         case FramingMode.Simplex:
         case FramingMode.SingletonSized:
             return;
     }
     Exception exception = this.CreateException(new InvalidDataException(System.ServiceModel.SR.GetString("FramingModeNotSupported", new object[] { mode.ToString() })), "http://schemas.microsoft.com/ws/2006/05/framing/faults/UnsupportedMode");
     throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(exception);
 }
Пример #2
0
        protected void ValidateFramingMode(FramingMode mode)
        {
            switch (mode)
            {
            case FramingMode.Singleton:
            case FramingMode.Duplex:
            case FramingMode.Simplex:
            case FramingMode.SingletonSized:
            {
                return;
            }

            default:
            {
                string    framingModeNotSupported = Resources.FramingModeNotSupported;
                object[]  str       = new object[] { mode.ToString() };
                Exception exception = this.CreateException(new InvalidDataException(Microsoft.ServiceBus.SR.GetString(framingModeNotSupported, str)), "http://schemas.microsoft.com/ws/2006/05/framing/faults/UnsupportedMode");
                throw Microsoft.ServiceBus.Diagnostics.DiagnosticUtility.ExceptionUtility.ThrowHelperError(exception);
            }
            }
        }
Пример #3
0
        protected void ValidateFramingMode(FramingMode mode)
        {
            switch (mode)
            {
            case FramingMode.Singleton:
            case FramingMode.Duplex:
            case FramingMode.Simplex:
            case FramingMode.SingletonSized:
                break;

            default:
            {
                Exception exception = CreateException(new InvalidDataException(string.Format(
                                                                                   SRServiceModel.FramingModeNotSupported, mode.ToString())), FramingEncodingString.UnsupportedModeFault);
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(exception);
            }
            }
        }
        protected void ValidateFramingMode(FramingMode mode)
        {
            switch (mode)
            {
            case FramingMode.Singleton:
            case FramingMode.Duplex:
            case FramingMode.Simplex:
            case FramingMode.SingletonSized:
                return;
            }
            Exception exception = this.CreateException(new InvalidDataException(System.ServiceModel.SR.GetString("FramingModeNotSupported", new object[] { mode.ToString() })), "http://schemas.microsoft.com/ws/2006/05/framing/faults/UnsupportedMode");

            throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(exception);
        }
Пример #5
0
 protected void ValidateFramingMode(FramingMode mode)
 {
     switch (mode)
     {
         case FramingMode.Singleton:
         case FramingMode.Duplex:
         case FramingMode.Simplex:
         case FramingMode.SingletonSized:
             break;
         default:
             {
                 Exception exception = CreateException(new InvalidDataException(SR.GetString(
                     SR.FramingModeNotSupported, mode.ToString())), FramingEncodingString.UnsupportedModeFault);
                 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(exception);
             }
     }
 }