void GenerateExceptions(Operation operation)
{
foreach (var exception in operation.Exceptions)
{
// Skip exceptions that have already been generated for the parent model
if (IsExceptionPresentInParentModel(this.Configuration, exception.Name))
continue;
// Check to see if the exceptions has already been generated for a previous operation.
if (!this._processedStructures.Contains(exception.Name))
{
var generator = new ExceptionClass()
{
Exception = exception,
GenerateComplexException = this.Configuration.ServiceModel.Customizations.GenerateComplexException,
BaseException = this.Configuration.BaseException
};
this.ExecuteGenerator(generator, exception.Name + ".cs", "Model");
this._processedStructures.Add(exception.Name);
}
}
}