@using System @using System.Linq; @using AutoRest.Core.Utilities @using AutoRest.CSharp @using AutoRest.CSharp.Model @inherits AutoRest.Core.Template @Header("// ") @EmptyLine namespace @Settings.Namespace { @foreach (var usingString in Model.Usings) { @:using @usingString; } @EmptyLine /// /// @(Model.TypeName) operations. /// public partial interface I@(Model.TypeName) { @foreach(MethodCs method in Model.Methods) { if (method.ExcludeFromInterface) { continue; } if (!String.IsNullOrEmpty(method.Description) || !String.IsNullOrEmpty(method.Summary)) { @:/// @:@WrapComment("/// ", String.IsNullOrEmpty(method.Summary) ? method.Description.EscapeXmlComment() : method.Summary.EscapeXmlComment()) if (!String.IsNullOrEmpty(method.ExternalDocsUrl)) { @:/// } @:/// } if (!String.IsNullOrEmpty(method.Description) && !String.IsNullOrEmpty(method.Summary)) { @:/// @:@WrapComment("/// ", method.Description.EscapeXmlComment()) @:/// } foreach (ParameterCs parameter in method.LocalParameters) { @:/// @:@WrapComment("/// ", parameter.DocumentationString.EscapeXmlComment()) @:/// } @:/// @:/// The headers that will be added to request. @:/// @:/// @:/// The cancellation token. @:/// @:/// @:/// Thrown when the operation returned an invalid status code @:/// @if (method.Responses.Where(r => r.Value.Body != null).Any()) { @:/// @:/// Thrown when unable to deserialize the response @:/// } @if (method.Parameters.Any(p => p.IsRequired && p.IsNullable())) { @:/// @:/// Thrown when a required parameter is null @:/// } @:@(method.GetObsoleteAttribute()) @:System.Threading.Tasks.Task<@method.OperationResponseReturnTypeString> @(method.Name)WithHttpMessagesAsync(@(method.GetAsyncMethodParameterDeclaration(true))); } } }