Exemple #1
0
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (MessageConnectionSettings == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "MessageConnectionSettings");
     }
     if (AcknowledgementConnectionSettings == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "AcknowledgementConnectionSettings");
     }
     if (MdnSettings == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "MdnSettings");
     }
     if (SecuritySettings == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "SecuritySettings");
     }
     if (ValidationSettings == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "ValidationSettings");
     }
     if (EnvelopeSettings == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "EnvelopeSettings");
     }
     if (ErrorSettings == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "ErrorSettings");
     }
     if (MessageConnectionSettings != null)
     {
         MessageConnectionSettings.Validate();
     }
     if (AcknowledgementConnectionSettings != null)
     {
         AcknowledgementConnectionSettings.Validate();
     }
     if (MdnSettings != null)
     {
         MdnSettings.Validate();
     }
     if (SecuritySettings != null)
     {
         SecuritySettings.Validate();
     }
     if (ValidationSettings != null)
     {
         ValidationSettings.Validate();
     }
     if (EnvelopeSettings != null)
     {
         EnvelopeSettings.Validate();
     }
     if (ErrorSettings != null)
     {
         ErrorSettings.Validate();
     }
 }
        public AuthorizeCheckOperationFilter(
            SwaggerSettings swaggerSettings,
            SecuritySettings securitySettings,
            ILoggerFactory logger)
        {
            _swaggerSettings = swaggerSettings ?? throw new SwaggerSettingsNullException(logger);
            _swaggerSettings.Validate();
            _swaggerSettings.Security.Validate();

            _securitySettings = securitySettings;
            securitySettings?.Validate();
        }
Exemple #3
0
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (ValidationSettings == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "ValidationSettings");
     }
     if (FramingSettings == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "FramingSettings");
     }
     if (EnvelopeSettings == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "EnvelopeSettings");
     }
     if (AcknowledgementSettings == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "AcknowledgementSettings");
     }
     if (MessageFilter == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "MessageFilter");
     }
     if (SecuritySettings == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "SecuritySettings");
     }
     if (ProcessingSettings == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "ProcessingSettings");
     }
     if (SchemaReferences == null)
     {
         throw new ValidationException(ValidationRules.CannotBeNull, "SchemaReferences");
     }
     if (ValidationSettings != null)
     {
         ValidationSettings.Validate();
     }
     if (FramingSettings != null)
     {
         FramingSettings.Validate();
     }
     if (EnvelopeSettings != null)
     {
         EnvelopeSettings.Validate();
     }
     if (AcknowledgementSettings != null)
     {
         AcknowledgementSettings.Validate();
     }
     if (MessageFilter != null)
     {
         MessageFilter.Validate();
     }
     if (SecuritySettings != null)
     {
         SecuritySettings.Validate();
     }
     if (ProcessingSettings != null)
     {
         ProcessingSettings.Validate();
     }
     if (EnvelopeOverrides != null)
     {
         foreach (var element in EnvelopeOverrides)
         {
             if (element != null)
             {
                 element.Validate();
             }
         }
     }
     if (ValidationOverrides != null)
     {
         foreach (var element1 in ValidationOverrides)
         {
             if (element1 != null)
             {
                 element1.Validate();
             }
         }
     }
     if (MessageFilterList != null)
     {
         foreach (var element2 in MessageFilterList)
         {
             if (element2 != null)
             {
                 element2.Validate();
             }
         }
     }
     if (SchemaReferences != null)
     {
         foreach (var element3 in SchemaReferences)
         {
             if (element3 != null)
             {
                 element3.Validate();
             }
         }
     }
     if (X12DelimiterOverrides != null)
     {
         foreach (var element4 in X12DelimiterOverrides)
         {
             if (element4 != null)
             {
                 element4.Validate();
             }
         }
     }
 }