Example #1
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="items"></param>
 public TypeCollection(TypeCollection items)
 {
     this.AddRange(items);
 }
Example #2
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="items"></param>
 public void AddRange(TypeCollection items)
 {
     this.InnerList.AddRange(items);
 }
Example #3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="items"></param>
 public TypeCollection(TypeCollection items)
 {
     this.AddRange(items);
 }
Example #4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="items"></param>
 public void AddRange(TypeCollection items)
 {
     this.InnerList.AddRange(items);
 }
Example #5
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="errorCodes"></param>
 /// <param name="exceptions"></param>
 /// <param name="httpStatusCodes"></param>
 public ExceptionFilter(string errorCodes, string exceptions, string httpStatusCodes)
 {
     mTriggerErrorCodes = ParseTriggerErrorCodes(errorCodes);
     mTriggerHttpStatusCodes = ParseTriggerHttpStatusCodes(httpStatusCodes);
     mTriggerExceptions = ParseTriggerExceptions(exceptions);
 }
Example #6
0
 /// <summary>
 /// Converts comma-separated list of exception type names into the appropriate TypeCollection ready to set into the filter.
 /// </summary>
 /// <param name="configString"></param>
 /// <returns></returns>
 public static TypeCollection ParseTriggerExceptions(string configString)
 {
     if (configString == null || configString.Length == 0)
         return null;
     TypeCollection outCollection = new TypeCollection();
     string[] tokens = configString.Split(SEPS);
     for (int i = 0; i < tokens.Length; i++)
     {
         string typename = tokens[i];
         Type t = null;
         // Normally you must fully-qualify the name, e.g. eBay.Service.Core.Sdk.ApiException.
         // We allow shorthand for the 3 obvious ones.
         if (tokens[i].ToLower(System.Globalization.CultureInfo.InvariantCulture).Equals("apiexception"))
             t = typeof(ApiException);
         else if (tokens[i].ToLower(System.Globalization.CultureInfo.InvariantCulture).Equals("httpexception"))
             t = typeof(HttpException);
         else if (tokens[i].ToLower(System.Globalization.CultureInfo.InvariantCulture).Equals("sdkexception"))
             t = typeof(SdkException);
         else
             t = Type.GetType(tokens[i]);
         outCollection.Add(t);
     }
     return outCollection;
 }