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)));
 }
 /// <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);
 }
        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;
        }