示例#1
0
 internal static RecipientData Create(EmailAddress emailAddress, ProviderError providerError)
 {
     return(new RecipientData(emailAddress)
     {
         providerError = providerError
     });
 }
示例#2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ASRProviderError" /> class with required parameters.
 /// </summary>
 /// <param name="error">ProviderError object</param>
 public ASRProviderError(ProviderError error)
 {
     //this.CreationTimeUtc = error.CreationTimeUtc;
     this.ErrorCode = error.ErrorCode;
     this.ErrorId = error.ErrorId;
     this.ErrorMessage = error.ErrorMessage;
 }
 public ProviderErrorViewItem(ProviderError error) : base(new string[5])
 {
     this.error            = error;
     this.SubItems[0].Text = error.DateTime.ToString();
     this.SubItems[1].Text = error.Provider.Name;
     this.SubItems[2].Text = error.Id.ToString();
     this.SubItems[3].Text = error.Code.ToString();
     this.SubItems[4].Text = error.Message;
 }
示例#4
0
        private void ViewErrorDetails(ProviderError error)
        {
            ProviderErrorDetailsForm errorDetailsForm = new ProviderErrorDetailsForm();

            errorDetailsForm.SetCurrentError(error);
            int num = (int)errorDetailsForm.ShowDialog((IWin32Window)this);

            errorDetailsForm.Dispose();
        }
 internal void method_6(ProviderError providerError_0)
 {
     if (this.strategy__0 != null && this.strategy__0.Status == StrategyStatus.Running)
     {
         for (int i = 0; i < this.list_0.Count; i++)
         {
             this.list_0[i].vmethod_5(providerError_0);
         }
     }
 }
示例#6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ASRProviderError" /> class with required parameters.
 /// </summary>
 /// <param name="error">ProviderError object</param>
 public ASRProviderError(ProviderError error)
 {
     this.AffectedObjects = error.AffectedObjects;
     this.CreationTimeUtc = error.CreationTimeUtc;
     this.ErrorCode       = error.ErrorCode;
     this.ErrorId         = error.ErrorId;
     this.ErrorLevel      = error.ErrorLevel;
     this.ErrorMessage    = error.ErrorMessage;
     this.WorkflowId      = error.WorkflowId;
 }
示例#7
0
        private void UpdateDetails()
        {
            ProviderError providerError = ProviderManager.Errors[this.index];

            this.tbxDateTime.Text = providerError.DateTime.ToString();
            this.tbxProvider.Text = providerError.Provider.Name;
            this.tbxId.Text       = providerError.Id.ToString();
            this.tbxCode.Text     = providerError.Code.ToString();
            this.tbxMessage.Text  = providerError.Message;
            this.btnPrev.Enabled  = this.index > 0;
            this.btnNext.Enabled  = this.index < ProviderManager.Errors.Count - 1;
        }
示例#8
0
 void Load(string filePath, string key, DependencyObject target)
 {
     try
     {
         var json = File.ReadAllText(filePath);
         _applicationLocalize         = Newtonsoft.Json.JsonConvert.DeserializeObject <ApplicationLocalize>(json);
         _applicationLocalize.Culture = LocalizeDictionary.Instance.Culture;
     }
     catch (Exception ex)
     {
         var message = $"Provider IO exception: {ex.InnerException?.Message ?? ex.Message ?? "Unknown error"}";
         ProviderError?.Invoke(this, new ProviderErrorEventArgs(target, key, message));
     }
 }
示例#9
0
 public MsgProviderError() : base(12)
 {
     this.Data = new ProviderError();
 }
示例#10
0
 public void SetCurrentError(ProviderError error)
 {
     this.index = new ArrayList((ICollection)ProviderManager.Errors).IndexOf(error);
     this.UpdateDetails();
 }
示例#11
0
        private string BuildAndVerifyObjectListFilter <TConfigObject>(ADIdParameter[] adParameterList, string parameterName, NewManagementScope.SingleParameterLocString misspelledObjectNamesString, NewManagementScope.SingleParameterLocString duplicateObjectNamesString, NewManagementScope.SingleParameterLocString parsingExceptionString) where TConfigObject : ADLegacyVersionableObject, new()
        {
            string[] array = new string[adParameterList.Length];
            for (int i = 0; i < adParameterList.Length; i++)
            {
                array[i] = adParameterList[i].ToString();
            }
            Result <TConfigObject>[] array2         = base.GlobalConfigSession.ReadMultipleLegacyObjects <TConfigObject>(array);
            ComparisonFilter[]       array3         = new ComparisonFilter[array2.Length];
            StringBuilder            stringBuilder  = null;
            StringBuilder            stringBuilder2 = null;
            List <TConfigObject>     list           = new List <TConfigObject>();

            for (int j = 0; j < array2.Length; j++)
            {
                TConfigObject data  = array2[j].Data;
                ProviderError error = array2[j].Error;
                if (error == ProviderError.NotFound)
                {
                    if (stringBuilder == null)
                    {
                        stringBuilder = new StringBuilder();
                    }
                    stringBuilder.Append("\r\n");
                    stringBuilder.Append(array[j].ToString());
                }
                else if (error == null && data != null)
                {
                    if (list.Contains(data))
                    {
                        if (stringBuilder2 == null)
                        {
                            stringBuilder2 = new StringBuilder();
                        }
                        stringBuilder2.Append("\r\n");
                        stringBuilder2.Append(data.Name);
                    }
                    else
                    {
                        array3[j] = new ComparisonFilter(ComparisonOperator.Equal, ADObjectSchema.DistinguishedName, data.DistinguishedName);
                        list.Add(data);
                    }
                }
            }
            if (stringBuilder != null)
            {
                base.WriteError(new ArgumentException(misspelledObjectNamesString(stringBuilder.ToString()), parameterName), ErrorCategory.InvalidArgument, null);
            }
            if (stringBuilder2 != null)
            {
                base.WriteError(new ArgumentException(duplicateObjectNamesString(stringBuilder2.ToString()), parameterName), ErrorCategory.InvalidArgument, null);
            }
            string      result = string.Empty;
            QueryFilter queryFilter;

            if (array3.Length == 1)
            {
                queryFilter = array3[0];
            }
            else
            {
                queryFilter = new OrFilter(array3);
            }
            try
            {
                result = queryFilter.GenerateInfixString(FilterLanguage.Monad);
            }
            catch (ParsingException ex)
            {
                base.WriteError(new ArgumentException(parsingExceptionString(ex.Message), parameterName, ex), ErrorCategory.InvalidArgument, null);
            }
            return(result);
        }
示例#12
0
 /// <summary>
 /// Calls the <see cref="ILocalizationProvider.ProviderError"/> event.
 /// </summary>
 /// <param name="target">The target object.</param>
 /// <param name="key">The key.</param>
 /// <param name="message">The error message.</param>
 private void OnProviderError(DependencyObject target, string key, string message)
 {
     ProviderError?.Invoke(this, new ProviderErrorEventArgs(target, key, message));
 }
示例#13
0
 internal void method_6(ProviderError providerError_0)
 {
     if (this.strategy__0 != null && this.strategy__0.Status == StrategyStatus.Running)
     {
         for (int i = 0; i < this.list_0.Count; i++)
         {
             this.list_0[i].vmethod_5(providerError_0);
         }
     }
 }
示例#14
0
		public virtual void OnError(ProviderError error)
		{
		}
示例#15
0
 public void OnProviderError(ProviderError error) => OnEvent(error);
示例#16
0
 protected virtual void OnProviderError(ProviderErrorEventArgs args)
 {
     ProviderError?.Invoke(this, args);
 }
示例#17
0
 protected void InvokeSecurityProviderError()
 {
     ProviderError?.Invoke(this, new ErrorEventArgs(new ProviderSecurityException(ErrorMessage)));
 }
示例#18
0
 public void OnProviderError(ProviderError error) => OnEvent(error);
示例#19
0
 private void AddError(ProviderError error)
 {
     this.ltvErrors.Items.Insert(0, (ListViewItem) new ProviderErrorViewItem(error));
 }