ServiceClientGenerator.GeneratorDriver.GenerateStructures C# (CSharp) Method

GenerateStructures() public method

Generates all the POCOs that go in the Model namespace for the structures defined in the service model.
public GenerateStructures ( ) : void
return void
        void GenerateStructures()
        {
            var excludedOperations = Configuration.ServiceModel.ExcludedOperations;

            foreach (var definition in this._structuresToProcess)
            {
                // Skip structures that have already been generated for the parent model
                if (IsShapePresentInParentModel(this.Configuration, definition.Name))
                    continue;

                if (!this._processedStructures.Contains(definition.Name) && !definition.IsException)
                {
                    // if the shape had a substitution, we can skip generation
                    if (this.Configuration.ServiceModel.Customizations.IsSubstitutedShape(definition.Name))
                        continue;

                    // if the shape is a request or response type and the parent operation
                    // was excluded, then skip generation
                    var opName = definition.RelatedOperationName;
                    if (!string.IsNullOrEmpty(opName) && excludedOperations.Contains(opName))
                        continue;

                    var generator = new StructureGenerator()
                    {
                        ClassName = definition.Name,
                        Structure = definition
                    };
                    this.ExecuteGenerator(generator, definition.Name + ".cs", "Model");
                    this._processedStructures.Add(definition.Name);
                }
            }
        }