ServiceClientGenerator.GeneratorDriver.GenerateExceptions C# (CSharp) Метод

GenerateExceptions() публичный Метод

Generates exception classes in the model namespaces for exceptions declared in the service model.
public GenerateExceptions ( Operation operation ) : void
operation Operation The operation to generate exceptions for
Результат void
        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);
                }
            }
        }