Exemplo n.º 1
0
 /// <include file='doc\BindingCompleteEventArgs.uex' path='docs/doc[@for="BindingCompleteEventArgs.BindingCompleteEventArgs1"]/*' />
 /// <devdoc>
 ///    Constructor for BindingCompleteEventArgs.
 /// </devdoc>
 public BindingCompleteEventArgs(Binding binding,
                                 BindingCompleteState state,
                                 BindingCompleteContext context,
                                 string errorText,
                                 Exception exception) : this(binding, state, context, errorText, exception, true)
 {
 }
 /// <summary>
 ///  Constructor for BindingCompleteEventArgs.
 /// </summary>
 public BindingCompleteEventArgs(
     Binding?binding,
     BindingCompleteState state,
     BindingCompleteContext context)
     : this(binding, state, context, string.Empty, null, false)
 {
 }
Exemplo n.º 3
0
        private BindingCompleteEventArgs CreateBindingCompleteEventArgs(BindingCompleteContext context, Exception ex)
        {
            bool   cancel              = false;
            string errorText           = string.Empty;
            BindingCompleteState state = BindingCompleteState.Success;

            if (ex != null)
            {
                // If an exception was provided, report that
                errorText = ex.Message;
                state     = BindingCompleteState.Exception;
                cancel    = true;
            }
            else
            {
                // If data error info on data source for this binding, report that
                errorText = this.BindToObject.DataErrorText;

                // We should not cancel with an IDataErrorInfo error - we didn't in Everett
                if (!string.IsNullOrEmpty(errorText))
                {
                    state = BindingCompleteState.DataError;
                }
            }

            return(new BindingCompleteEventArgs(this, state, context, errorText, ex, cancel));
        }
 /// <summary>
 ///  Constructor for BindingCompleteEventArgs.
 /// </summary>
 public BindingCompleteEventArgs(
     Binding?binding,
     BindingCompleteState state,
     BindingCompleteContext context,
     string?errorText)
     : this(binding, state, context, errorText, null, true)
 {
 }
 public BindingCompleteEventArgs(Binding binding, BindingCompleteState state, BindingCompleteContext context, string errorText, Exception exception, bool cancel)
     : base(cancel)
 {
     this.binding    = binding;
     this.state      = state;
     this.context    = context;
     this.error_text = errorText;
     this.exception  = exception;
 }
		public BindingCompleteEventArgs(Binding binding, BindingCompleteState state, BindingCompleteContext context, string errorText, Exception exception, bool cancel)
			: base (cancel)
		{
			this.binding = binding;
			this.state = state;
			this.context = context;
			this.error_text = errorText;
			this.exception = exception;
		}
 /// <summary>
 ///  Constructor for BindingCompleteEventArgs.
 /// </summary>
 public BindingCompleteEventArgs(Binding binding,
                                 BindingCompleteState state,
                                 BindingCompleteContext context,
                                 string errorText,
                                 Exception exception,
                                 bool cancel) : base(cancel)
 {
     Binding = binding;
     BindingCompleteState   = state;
     BindingCompleteContext = context;
     ErrorText = errorText ?? string.Empty;
     Exception = exception;
 }
        private BindingCompleteEventArgs CreateBindingCompleteEventArgs(BindingCompleteContext context, Exception ex)
        {
            bool   cancel  = false;
            string message = string.Empty;
            BindingCompleteState success = BindingCompleteState.Success;

            if (ex != null)
            {
                message = ex.Message;
                success = BindingCompleteState.Exception;
                cancel  = true;
            }
            else
            {
                message = this.BindToObject.DataErrorText;
                if (!string.IsNullOrEmpty(message))
                {
                    success = BindingCompleteState.DataError;
                }
            }
            return(new BindingCompleteEventArgs(this, success, context, message, ex, cancel));
        }
 /// <include file='doc\BindingCompleteEventArgs.uex' path='docs/doc[@for="BindingCompleteEventArgs.BindingCompleteEventArgs3"]/*' />
 /// <devdoc>
 ///    Constructor for BindingCompleteEventArgs.
 /// </devdoc>
 public BindingCompleteEventArgs(Binding binding,
                                 BindingCompleteState state,
                                 BindingCompleteContext context) : this(binding, state, context, string.Empty, null, false) {
 }
	public BindingCompleteEventArgs(Binding binding, BindingCompleteState state, BindingCompleteContext context) {}
	public BindingCompleteEventArgs(Binding binding, BindingCompleteState state, BindingCompleteContext context, string errorText, System.Exception exception) {}
        public void Ctor_Binding_BindingCompleteState_BindingCompleteContext_String(Binding binding, BindingCompleteState state, BindingCompleteContext context, string errorText)
        {
            var e = new BindingCompleteEventArgs(binding, state, context, errorText);

            Assert.Equal(binding, e.Binding);
            Assert.Equal(state, e.BindingCompleteState);
            Assert.Equal(context, e.BindingCompleteContext);
            Assert.Equal(errorText ?? "", e.ErrorText);
            Assert.Null(e.Exception);
            Assert.True(e.Cancel);
        }
        public void Ctor_Binding_BindingCompleteState_BindingCompleteContext_String_Exception_Bool(Binding binding, BindingCompleteState state, BindingCompleteContext context, string errorText, Exception exception, bool cancel)
        {
            var e = new BindingCompleteEventArgs(binding, state, context, errorText, exception, cancel);

            Assert.Equal(binding, e.Binding);
            Assert.Equal(state, e.BindingCompleteState);
            Assert.Equal(context, e.BindingCompleteContext);
            Assert.Equal(errorText ?? "", e.ErrorText);
            Assert.Equal(exception, e.Exception);
            Assert.Equal(cancel, e.Cancel);
        }
Exemplo n.º 14
0
 public BindingCompleteEventArgs(Binding binding, BindingCompleteState state, BindingCompleteContext context)
 {
     throw null;
 }
        public void Ctor_Binding_BindingCompleteState_BindingCompleteContext(Binding binding, BindingCompleteState state, BindingCompleteContext context)
        {
            var e = new BindingCompleteEventArgs(binding, state, context);

            Assert.Equal(binding, e.Binding);
            Assert.Equal(state, e.BindingCompleteState);
            Assert.Equal(context, e.BindingCompleteContext);
            Assert.Empty(e.ErrorText);
            Assert.Null(e.Exception);
            Assert.False(e.Cancel);
        }
Exemplo n.º 16
0
 public BindingCompleteEventArgs(Binding binding, BindingCompleteState state, BindingCompleteContext context, string errorText, Exception exception)
 {
     throw null;
 }
Exemplo n.º 17
0
 public BindingCompleteEventArgs(Binding binding, BindingCompleteState state, BindingCompleteContext context, string errorText)
 {
 }
Exemplo n.º 18
0
 public BindingCompleteEventArgs(Binding binding, BindingCompleteState state, BindingCompleteContext context, string errorText, System.Exception exception)
 {
 }
 /// <include file='doc\BindingCompleteEventArgs.uex' path='docs/doc[@for="BindingCompleteEventArgs.BindingCompleteEventArgs2"]/*' />
 /// <devdoc>
 ///    Constructor for BindingCompleteEventArgs.
 /// </devdoc>
 public BindingCompleteEventArgs(Binding binding,
                                 BindingCompleteState state,
                                 BindingCompleteContext context,
                                 string errorText) : this(binding, state, context, errorText, null, true) {
 }
 /// <include file='doc\BindingCompleteEventArgs.uex' path='docs/doc[@for="BindingCompleteEventArgs.BindingCompleteEventArgs1"]/*' />
 /// <devdoc>
 ///    Constructor for BindingCompleteEventArgs.
 /// </devdoc>
 public BindingCompleteEventArgs(Binding binding,
                                 BindingCompleteState state,
                                 BindingCompleteContext context,
                                 string errorText,
                                 Exception exception) : this(binding, state, context, errorText, exception, true) {
 }