コード例 #1
0
 public ServiceClientTemplateModel(ServiceClient serviceClient)
 {
     this.LoadFrom(serviceClient);
     HasModelTypes = serviceClient.HasModelTypes();
     MethodTemplateModels = new List<MethodTemplateModel>();
     Methods.Where(m => m.Group == null)
         .ForEach(m => MethodTemplateModels.Add(new MethodTemplateModel(m, serviceClient)));
 }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of ServiceClientTemplateModel class.
 /// </summary>
 /// <param name="serviceClient"></param>
 public ServiceClientTemplateModel(ServiceClient serviceClient)
 {
     this.LoadFrom(serviceClient);
     HasModelTypes = serviceClient.HasModelTypes();
     MethodTemplateModels = new List<MethodTemplateModel>();
     Methods.Where(m => m.Group == null)
         .ForEach(m => MethodTemplateModels.Add(new MethodTemplateModel(m, serviceClient)));
     this.IsCustomBaseUri = serviceClient.Extensions.ContainsKey(Microsoft.Rest.Generator.Extensions.ParameterizedHostExtension);
 }
コード例 #3
0
        public MethodGroupTemplateModel(ServiceClient serviceClient, string operationName)
        {
            this.LoadFrom(serviceClient);

            HasModelTypes = serviceClient.HasModelTypes();

            MethodTemplateModels = new List<MethodTemplateModel>();

            Methods.Where(m => m.Group == operationName)
                .ForEach(m => MethodTemplateModels.Add(new MethodTemplateModel(m, serviceClient)));

            MethodGroupName = operationName;
        }