// ------------------------------------------------------------------------------ // // This code was generated by a tool. // Runtime Version: 17.0.0.0 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // // ------------------------------------------------------------------------------ namespace ServiceClientGenerator.Generators.Examples { using System.Linq; using System.Text; using System.Collections.Generic; using System; /// /// Class to produce the template output /// #line 1 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Examples\ExampleCode.tt" [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.TextTemplating", "17.0.0.0")] public partial class ExampleCode : Generators.BaseGenerator { #line hidden /// /// Create the template output /// public override string TransformText() { this.Write("using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing Syste" + "m.Text;\r\nusing System.Threading.Tasks;\r\n\r\nusing "); #line 12 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Examples\ExampleCode.tt" this.Write(this.ToStringHelper.ToStringWithCulture(this.Config.Namespace)); #line default #line hidden this.Write(";\r\nusing "); #line 13 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Examples\ExampleCode.tt" this.Write(this.ToStringHelper.ToStringWithCulture(this.Config.Namespace)); #line default #line hidden this.Write(".Model;\r\n\r\nnamespace AWSSDKDocSamples."); #line 15 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Examples\ExampleCode.tt" this.Write(this.ToStringHelper.ToStringWithCulture(this.Config.Namespace)); #line default #line hidden this.Write(".Generated\r\n{\r\n\tclass "); #line 17 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Examples\ExampleCode.tt" this.Write(this.ToStringHelper.ToStringWithCulture(this.Config.ClassName)); #line default #line hidden this.Write("Samples : ISample\r\n\t{\r\n"); #line 19 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Examples\ExampleCode.tt" foreach(var operation in this.Config.ServiceModel.Operations) { foreach(var example in operation.Examples) { #line default #line hidden this.Write("\t\tpublic void "); #line 25 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Examples\ExampleCode.tt" this.Write(this.ToStringHelper.ToStringWithCulture(this.Config.ClassName)); #line default #line hidden #line 25 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Examples\ExampleCode.tt" this.Write(this.ToStringHelper.ToStringWithCulture(operation.Name)); #line default #line hidden this.Write("()\r\n\t\t{\r\n\t\t\t#region "); #line 27 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Examples\ExampleCode.tt" this.Write(this.ToStringHelper.ToStringWithCulture(example.Id)); #line default #line hidden this.Write("\r\n\r\n\t\t\tvar client = new Amazon"); #line 29 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Examples\ExampleCode.tt" this.Write(this.ToStringHelper.ToStringWithCulture(this.Config.ClassName)); #line default #line hidden this.Write("Client();\r\n\t\t\tvar response = client."); #line 30 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Examples\ExampleCode.tt" this.Write(this.ToStringHelper.ToStringWithCulture(operation.Name)); #line default #line hidden this.Write("(new "); #line 30 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Examples\ExampleCode.tt" this.Write(this.ToStringHelper.ToStringWithCulture(operation.Name)); #line default #line hidden this.Write("Request \r\n\t\t\t{\r\n"); #line 32 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Examples\ExampleCode.tt" var lines = example.GetRequestAssignments(currentIndent: 16); foreach(var line in lines) { #line default #line hidden this.Write("\t\t\t\t"); #line 37 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Examples\ExampleCode.tt" this.Write(this.ToStringHelper.ToStringWithCulture(line)); #line default #line hidden this.Write("\r\n"); #line 38 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Examples\ExampleCode.tt" } #line default #line hidden this.Write("\t\t\t});\r\n\r\n"); #line 43 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Examples\ExampleCode.tt" var responses = example.GetResponseAssignments(); foreach(var resp in responses) { #line default #line hidden this.Write("\t\t\t"); #line 48 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Examples\ExampleCode.tt" this.Write(this.ToStringHelper.ToStringWithCulture(resp)); #line default #line hidden this.Write("\r\n"); #line 49 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Examples\ExampleCode.tt" } #line default #line hidden this.Write("\r\n\t\t\t#endregion\r\n\t\t}\r\n\r\n"); #line 56 "C:\projects\aws\AWSDotNetPublic\generator\ServiceClientGeneratorLib\Generators\Examples\ExampleCode.tt" } } #line default #line hidden this.Write("\t\t\r\n\t\t# region ISample Members\r\n\t\tpublic virtual void Run()\r\n\t\t{\r\n\r\n\t\t}\r\n\t\t# endr" + "egion\r\n\r\n\t}\r\n}\r\n"); return this.GenerationEnvironment.ToString(); } } #line default #line hidden }