Пример #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="WebServiceTypeDescription"/> class.
        /// </summary>
        /// <param name="declaringService">
        /// The declaring service.
        /// </param>
        /// <exception cref="ArgumentNullException">
        /// The <paramref name="declaringService"/> parameter is null.
        /// </exception>
        public WebServiceTypeDescription(IWebServiceClientDescription declaringService)
        {
            if (declaringService == null)
                throw new ArgumentNullException("declaringService");

            _declaringService = declaringService;
        }
        private void SetServiceDescription(IWebServiceClientDescription serviceDescription)
        {
            ServiceDescription = serviceDescription;

            if (Model.ServiceDescriptionId != serviceDescription.Id)
            {
                Model.ServiceDescriptionId = serviceDescription.Id;
                Model.EndpointConfiguration = serviceDescription.EndpointConfiguration;
                SelectedMethod = string.Empty;
            }

            Model.ContractTypeName = serviceDescription.ContractTypeName;

            PopulateMethods();
            UpdateInputParameters();
            UpdateOutputParameters();

            UpdateInputParameterViewModels(false);
            UpdateInputHeaderViewModels(false);
            UpdateOutputParameterViewModels(false);
            UpdateOutputHeaderViewModels(false);

            ((IActionCommand)EditMethodParametersMappingCommand).RaiseCanExecuteChanged();
            ((IActionCommand)EditMethodResultMappingCommand).RaiseCanExecuteChanged();
        }