Example #1
0
        private Base26Values DecodeArfLinkMatches(Match match)
        {
            int[] arr = DecodeBase26Array(match.Groups[1].ToString());
            var returnValue = new Base26Values();

            if (arr.Length == 2)
            {
                if (arr[0] > 1000000000)
                {
                    returnValue.SingleResultId = arr[0];
                    returnValue.ActionId = arr[1]; 
                }
                else
                {
                    returnValue.ActionId = arr[0];
                    returnValue.RedirectId = arr[1]; 
                }
            }
            else if (arr.Length == 3 && arr[0] > 1000000000)
            {
                returnValue.SingleResultId = arr[0];
                returnValue.ActionId = arr[1];
                returnValue.RedirectId = arr[2];
            }
            else if (arr.Length > 2)
            {
                if (arr[1] == 0 && arr[2] == 0)
                    returnValue.SingleResultId = arr[0];
                else
                {
                    returnValue.SubscriberId = arr[0];
                    returnValue.ListId = arr[1];
                    returnValue.BatchId = arr[2];
                }

                if (arr.Length > 3)
                {
                    returnValue.ActionId = arr[3];
                    if (arr.Length > 4)
                        returnValue.RedirectId = arr[4];
                }
            }
            else if (arr.Length == 1)
            {
                if (arr[0] > 1000000000)
                    returnValue.SingleResultId = arr[0];
                else
                    returnValue.ActionId = arr[0];
            }

            return returnValue;
        }
Example #2
0
 public ConversionData(Base26Values values) : this()
 {
     this.BatchId = values.BatchId;
     this.ListId = values.ListId;
     this.SubscriberId = values.SubscriberId;
 }