コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="WebMethodCallResultViewModel"/> class.
        /// </summary>
        /// <param name="model">
        /// The model.
        /// </param>
        /// <param name="field">
        /// The field.
        /// </param>
        /// <param name="parentNode">
        /// The parent node.
        /// </param>
        /// <param name="popupFactory">
        /// The popup factory.
        /// </param>
        /// <param name="selectChildTypeFieldsViewModel">
        /// The select child type fields view model.
        /// </param>
        /// <param name="resultViewModelFactory">
        /// The result view model factory.
        /// </param>
        /// <param name="resultFieldFactory">
        /// The result field factory.
        /// </param>
        public WebMethodCallResultViewModel(
            IWebMethodCallResultField model,
            IWebServiceTypeFieldDescription field,
            IWebMethodCallResultViewModel parentNode,
            PopupFactory popupFactory,
            ISelectChildTypeFieldsViewModel selectChildTypeFieldsViewModel,
            IWebMethodCallResultViewModelFactory resultViewModelFactory,
            IWebMethodCallResultFieldFactory resultFieldFactory)
        {
            if (field == null)
                throw new ArgumentNullException("field");

            if (parentNode == null)
                throw new ArgumentNullException("parentNode");

            if (popupFactory == null)
                throw new ArgumentNullException("popupFactory");

            if (selectChildTypeFieldsViewModel == null)
                throw new ArgumentNullException("selectChildTypeFieldsViewModel");

            if (resultViewModelFactory == null)
                throw new ArgumentNullException("resultViewModelFactory");

            if (resultFieldFactory == null)
                throw new ArgumentNullException("resultFieldFactory");

            _model = model;
            _name = field.Name;
            _baseType = field.FieldType;
            _declaringType = field.DeclaringType;
            _parentNode = parentNode;
            PopupFactory = popupFactory;
            SelectChildTypeFieldsViewModel = selectChildTypeFieldsViewModel;
            ResultViewModelFactory = resultViewModelFactory;
            ResultFieldFactory = resultFieldFactory;
        }
コード例 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="WebMethodCallResultViewModel"/> class.
        /// </summary>
        /// <param name="model">
        /// The model.
        /// </param>
        /// <param name="parameter">
        /// The parameter.
        /// </param>
        /// <param name="parentSettings">
        /// The parent settings.
        /// </param>
        /// <param name="popupFactory">
        /// The popup factory.
        /// </param>
        /// <param name="selectChildTypeFieldsViewModel">
        /// The select child type fields view model.
        /// </param>
        /// <param name="resultViewModelFactory">
        /// The result view model factory.
        /// </param>
        /// <param name="resultFieldFactory">
        /// The result field factory.
        /// </param>
        public WebMethodCallResultViewModel(
            IWebMethodCallResultField model,
            IWebServiceMethodParameterDescription parameter,
            IWebMethodCallSettingsViewModel parentSettings,
            PopupFactory popupFactory,
            ISelectChildTypeFieldsViewModel selectChildTypeFieldsViewModel,
            IWebMethodCallResultViewModelFactory resultViewModelFactory,
            IWebMethodCallResultFieldFactory resultFieldFactory)
        {
            if (parameter == null)
                throw new ArgumentNullException("parameter");

            if (parentSettings == null)
                throw new ArgumentNullException("parentSettings");

            if (popupFactory == null)
                throw new ArgumentNullException("popupFactory");

            if (selectChildTypeFieldsViewModel == null)
                throw new ArgumentNullException("selectChildTypeFieldsViewModel");

            if (resultViewModelFactory == null)
                throw new ArgumentNullException("resultViewModelFactory");

            if (resultFieldFactory == null)
                throw new ArgumentNullException("resultFieldFactory");

            _model = model;
            _name = parameter.Name;
            _baseType = parameter.ParameterType;
            _parentSettings = parentSettings;
            PopupFactory = popupFactory;
            SelectChildTypeFieldsViewModel = selectChildTypeFieldsViewModel;
            ResultViewModelFactory = resultViewModelFactory;
            ResultFieldFactory = resultFieldFactory;
        }