)>}]
شركة التطبيقات المتكاملة لتصميم وبرمجة البرمجيات الخاصة ش.ش.و.
Integrated Applications Programming Company
Home » Code Library » Access (Ia.Ftn.Cl.Models.Ui.Provision)

Public general use code classes and xml files that we've compiled and used over the years:

Access support class for Fixed Telecommunications Network (FTN) ui model.

    1: using Microsoft.AspNetCore.Identity;
    2: using System;
    3: using System.Data;
    4: using System.IO;
    5: using System.Linq;
    6: using System.Text;
    7: using System.Text.RegularExpressions;
    8:  
    9: namespace Ia.Ftn.Cl.Models.Ui.Provision
   10: {
   11:     ////////////////////////////////////////////////////////////////////////////
   12:  
   13:     /// <summary publish="true">
   14:     /// Access support class for Fixed Telecommunications Network (FTN) ui model.
   15:     /// </summary>
   16:     /// 
   17:     /// <remarks> 
   18:     /// Copyright © 2006-2019 Jasem Y. Al-Shamlan (info@ia.com.kw), Integrated Applications - Kuwait. All Rights Reserved.
   19:     /// </remarks> 
   20:     public class Access
   21:     {
   22:         UserManager<Ia.Ftn.Cl.Models.StaffIdentityUser> userManager;
   23:  
   24:         /// <summary/>
   25:         public Access(UserManager<Ia.Ftn.Cl.Models.StaffIdentityUser> _userManager)
   26:         {
   27:             userManager = _userManager;
   28:         }
   29:  
   30:         /////////////////////////////////////////////////////////////////////////////////
   31:  
   32:         /// <summary>
   33:         ///
   34:         /// </summary>
   35:         public static void Manage(Ia.Ftn.Cl.Models.Business.Administration.StaffContact staffContact, string opcode, string operand, out string responseSubject, out string responseContent)
   36:         {
   37:             int i;
   38:             string line, accessNameRow, odf, kuwaitFtnAreaSymbol, block, street, premisesOld, premisesNew, paci, note;
   39:             string ontEquipmentTypeString, ontSerialNumber, ip;
   40:             StringBuilder stringBuilder;
   41:             DateTime now;
   42:             Ia.Cl.Models.Result documentValidityResult;
   43:             Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType ontFamilyType;
   44:             Ia.Ftn.Cl.Models.Business.Huawei.Ont.EquipmentType emsOntEquipmentType;
   45:             Ia.Ftn.Cl.Models.Access access;
   46:             Ia.Ftn.Cl.Models.Business.NetworkDesignDocument.Ont nddOnt;
   47:  
   48:             documentValidityResult = new Ia.Cl.Models.Result();
   49:  
   50:             opcode = opcode.ToLower();
   51:  
   52:             now = DateTime.UtcNow.AddHours(3);
   53:  
   54:             // subject can't have \r\n
   55:             responseSubject = Ia.Cl.Models.ApplicationConfiguration.GetSetting("AppSettings:SiteName") + " (" + now.ToString("yyyy-MM-dd HH:mm") + ")";
   56:             responseContent = Ia.Cl.Models.ApplicationConfiguration.GetSetting("AppSettings:SiteName") + " " + now.ToString("yyyy-MM-dd HH:mm") + "\r\n";
   57:  
   58:             if (opcode.Contains("help"))
   59:             {
   60:                 responseContent += Ia.Ftn.Cl.Models.Data.Help.Text("mail/provision/access");
   61:                 responseContent += "\r\n";
   62:             }
   63:             else
   64:             {
   65:                 if (opcode.StartsWith("mail/provision/access/create"))
   66:                 {
   67:                     if (Ia.Ftn.Cl.Models.Business.Authority.StaffContactCanCreateReadUpdateDeleteAccessList(Ia.Ftn.Cl.Models.Business.Authority.PersistentStorageFunction.Create, staffContact))
   68:                     {
   69:                         responseContent += @"Opcode: """ + opcode + @"""." + "\r\n";
   70:                         //content += @"Operand: """ + operand + @"""." + "\r\n";
   71:                         responseContent += "\r\n";
   72:  
   73:                         stringBuilder = new StringBuilder(10000);
   74:  
   75:                         using (StringReader reader = new StringReader(operand))
   76:                         {
   77:                             if (operand.Length > 0)
   78:                             {
   79:                                 while ((line = reader.ReadLine()) != null)
   80:                                 {
   81:                                     if (!string.IsNullOrEmpty(line)) // skip empty lines
   82:                                     {
   83:                                         if (ParseLine(line, ref stringBuilder, out accessNameRow, out kuwaitFtnAreaSymbol, out block, out street, out premisesOld, out premisesNew, out ontSerialNumber, out ip, out ontEquipmentTypeString, out odf, out paci))
   84:                                         {
   85:                                             if (ontSerialNumber != "0" && !string.IsNullOrEmpty(ontSerialNumber))
   86:                                             {
   87:                                                 if (Ia.Ftn.Cl.Models.Business.Huawei.Ont.IsValidSerialNumber(ontSerialNumber) || Ia.Ftn.Cl.Models.Business.Nokia.Ont.IsValidSerialNumber(ontSerialNumber)) // to check Huawei and Nokia ONTs
   88:                                                 {
   89:                                                     block = Ia.Ftn.Cl.Models.Business.Access.NormalizeBlockEntry(block);
   90:                                                     street = Ia.Ftn.Cl.Models.Business.Access.NormalizeStreetEntry(street);
   91:                                                     premisesOld = Ia.Ftn.Cl.Models.Business.Access.NormalizePremisesEntry(premisesOld);
   92:                                                     premisesNew = Ia.Ftn.Cl.Models.Business.Access.NormalizePremisesEntry(premisesNew);
   93:                                                     paci = Ia.Ftn.Cl.Models.Business.Access.NormalizePaciEntry(paci);
   94:                                                     odf = string.Empty; // odfPort;
   95:  
   96:                                                     if (!string.IsNullOrEmpty(paci) && int.TryParse(paci, out i))
   97:                                                     {
   98:                                                         var accessListByPaci = Ia.Ftn.Cl.Models.Data.Access.ReadListByPaci(paci);
   99:  
  100:                                                         // the new access is acceptable if the PACI is new or PACI exists with similar block and premises-old
  101:                                                         if (accessListByPaci.Count == 0 || accessListByPaci.Any(u => u.Block == block && u.PremisesOld == premisesOld))
  102:                                                         {
  103:                                                             if (!string.IsNullOrEmpty(block) /*&& int.TryParse(block, out i)*/) // there are blocks with letters like block 7B
  104:                                                             {
  105:                                                                 //if (!string.IsNullOrEmpty(street) && int.TryParse(street, out i))
  106:                                                                 //{
  107:                                                                 if (string.IsNullOrEmpty(premisesOld) || int.TryParse(premisesOld, out i))
  108:                                                                 {
  109:                                                                     //if (string.IsNullOrEmpty(premisesNew) || int.TryParse(premisesNew, out i))
  110:                                                                     //{
  111:                                                                     nddOnt = Ia.Ftn.Cl.Models.Business.Default.NddOntUsingExtractedAccessNameWithValidSymbolAndLegalFormatForPonAndOntFromValue(accessNameRow);
  112:  
  113:                                                                     if (nddOnt != null)
  114:                                                                     {
  115:                                                                         if (nddOnt.Pon.PonGroup.Olt.Odf.Vendor == Ia.Ftn.Cl.Models.Business.NetworkDesignDocument.Vendor.Nokia)
  116:                                                                         {
  117:                                                                             ontFamilyType = Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyTypeFromString(ontEquipmentTypeString);
  118:  
  119:                                                                             if (ontFamilyType != Ia.Ftn.Cl.Models.Business.Nokia.Ont.FamilyType.Undefined)
  120:                                                                             {
  121:                                                                                 if (string.IsNullOrEmpty(ip) || ip == nddOnt.Ip)
  122:                                                                                 {
  123:                                                                                     note = ontEquipmentTypeString + ": " + Ia.Ftn.Cl.Models.Business.Access.NormalizeOntSerialNumberEntry(ontSerialNumber);
  124:  
  125:                                                                                     access = Ia.Ftn.Cl.Models.Business.Access.Create(Ia.Ftn.Cl.Models.Business.MessageQueue.Application.EmailApplication, nddOnt.Access.Name, kuwaitFtnAreaSymbol, block, street, premisesOld, premisesNew, odf, paci, note, staffContact.StaffIdentityUser, out documentValidityResult);
  126:  
  127:                                                                                     stringBuilder.AppendLine(@"> [" + line.Trim() + @"]");
  128:                                                                                     stringBuilder.AppendLine(documentValidityResult.Message);
  129:                                                                                     stringBuilder.AppendLine(" ");
  130:                                                                                 }
  131:                                                                                 else
  132:                                                                                 {
  133:                                                                                     stringBuilder.AppendLine(@"> [" + line.Trim() + @"]");
  134:                                                                                     stringBuilder.AppendLine(@"Error: Submitted IP: " + ip + " does not match the Network Design Document (NDD) IP: " + nddOnt.Ip + ". ");
  135:                                                                                     stringBuilder.AppendLine(" ");
  136:                                                                                 }
  137:                                                                             }
  138:                                                                             else
  139:                                                                             {
  140:                                                                                 stringBuilder.AppendLine(@"> [" + line.Trim() + @"]");
  141:                                                                                 stringBuilder.AppendLine(@"Error: ONT family type is undefined. ");
  142:                                                                                 stringBuilder.AppendLine(" ");
  143:                                                                             }
  144:                                                                         }
  145:                                                                         else if (nddOnt.Pon.PonGroup.Olt.Odf.Vendor == Ia.Ftn.Cl.Models.Business.NetworkDesignDocument.Vendor.Huawei)
  146:                                                                         {
  147:                                                                             /// This is used to verify the ONT type in the contactors access submittal files 
  148:                                                                             emsOntEquipmentType = (from e in Ia.Ftn.Cl.Models.Business.Huawei.Ont.EquipmentTypeList where e.Name == ontEquipmentTypeString select e).SingleOrDefault();
  149:  
  150:                                                                             if (emsOntEquipmentType != null) //  Ia.Ftn.Cl.Model.Business.Huawei.Ont.EquipmentType.Undefined)
  151:                                                                             {
  152:                                                                                 note = ontEquipmentTypeString + ": " + Ia.Ftn.Cl.Models.Business.Access.NormalizeOntSerialNumberEntry(ontSerialNumber);
  153:  
  154:                                                                                 access = Ia.Ftn.Cl.Models.Business.Access.Create(Ia.Ftn.Cl.Models.Business.MessageQueue.Application.EmailApplication, nddOnt.Access.Name, kuwaitFtnAreaSymbol, block, street, premisesOld, premisesNew, odf, paci, note, staffContact.StaffIdentityUser, out documentValidityResult);
  155:  
  156:                                                                                 stringBuilder.AppendLine(@"> [" + line.Trim() + @"]");
  157:                                                                                 stringBuilder.AppendLine(documentValidityResult.Message);
  158:                                                                                 stringBuilder.AppendLine(" ");
  159:                                                                             }
  160:                                                                             else
  161:                                                                             {
  162:                                                                                 stringBuilder.AppendLine(@"> [" + line.Trim() + @"]");
  163:                                                                                 stringBuilder.AppendLine(@"Error: ONT family type is undefined. ");
  164:                                                                                 stringBuilder.AppendLine(" ");
  165:                                                                             }
  166:                                                                         }
  167:                                                                         else
  168:                                                                         {
  169:                                                                             stringBuilder.AppendLine(@"> [" + line.Trim() + @"]");
  170:                                                                             stringBuilder.AppendLine(@"Error: Access vendor is undefined. ");
  171:                                                                             stringBuilder.AppendLine(" ");
  172:                                                                         }
  173:                                                                     }
  174:                                                                     else
  175:                                                                     {
  176:                                                                         stringBuilder.AppendLine(@"> [" + line.Trim() + @"]");
  177:                                                                         stringBuilder.AppendLine(@"Error: Network design document does not recognize the access name " + accessNameRow + ". Access vendor is undefined. ");
  178:                                                                         stringBuilder.AppendLine(" ");
  179:                                                                     }
  180:                                                                 }
  181:                                                                 //else
  182:                                                                 //{
  183:                                                                 //    stringBuilder.AppendLine(@"> [" + line.Trim() + @"]");
  184:                                                                 //    stringBuilder.AppendLine(@"Error: PremisesNew number is undefined or invalid. ");
  185:                                                                 //    stringBuilder.AppendLine(" ");
  186:                                                                 //}
  187:                                                                 //}
  188:                                                                 else
  189:                                                                 {
  190:                                                                     stringBuilder.AppendLine(@"> [" + line.Trim() + @"]");
  191:                                                                     stringBuilder.AppendLine(@"Error: PremisesOld (Parcel) number " + premisesOld + " is undefined or invalid. ");
  192:                                                                     stringBuilder.AppendLine(" ");
  193:                                                                 }
  194:                                                                 //}
  195:                                                                 //else
  196:                                                                 //{
  197:                                                                 //    stringBuilder.AppendLine(@"> [" + line.Trim() + @"]");
  198:                                                                 //    stringBuilder.AppendLine(@"Error: Street number is undefined or invalid. ");
  199:                                                                 //    stringBuilder.AppendLine(" ");
  200:                                                                 //}
  201:                                                             }
  202:                                                             else
  203:                                                             {
  204:                                                                 stringBuilder.AppendLine(@"> [" + line.Trim() + @"]");
  205:                                                                 stringBuilder.AppendLine(@"Error: Block number " + block + " is undefined or invalid. ");
  206:                                                                 stringBuilder.AppendLine(" ");
  207:                                                             }
  208:                                                         }
  209:                                                         else
  210:                                                         {
  211:                                                             stringBuilder.AppendLine(@"> [" + line.Trim() + @"]");
  212:                                                             stringBuilder.AppendLine(@"Error: PACI number " + paci + " is already assigned to another ONT. To submit other ONTs with this same PACI their address must also have the same block and old permises numbers. ");
  213:                                                             stringBuilder.AppendLine(" ");
  214:                                                         }
  215:                                                     }
  216:                                                     else
  217:                                                     {
  218:                                                         stringBuilder.AppendLine(@"> [" + line.Trim() + @"]");
  219:                                                         stringBuilder.AppendLine(@"Error: PACI " + paci + " is undefined or invalid. ");
  220:                                                         stringBuilder.AppendLine(" ");
  221:                                                     }
  222:                                                 }
  223:                                                 else
  224:                                                 {
  225:                                                     stringBuilder.AppendLine(@"> [" + line.Trim() + @"]");
  226:                                                     stringBuilder.AppendLine(@"Error: ONT serial """ + ontSerialNumber + @""" is not valid. ");
  227:                                                     stringBuilder.AppendLine(" ");
  228:                                                 }
  229:                                             }
  230:                                             else
  231:                                             {
  232:                                                 stringBuilder.AppendLine(@"> [" + line.Trim() + @"]");
  233:                                                 stringBuilder.AppendLine(@"Error: ONT serial is null or zero. ");
  234:                                                 stringBuilder.AppendLine(" ");
  235:                                             }
  236:                                         }
  237:                                         else
  238:                                         {
  239:                                             // ref stringBuilder has a response
  240:                                             //stringBuilder.AppendLine(@"> [" + line.Trim() + @"]");
  241:                                             //stringBuilder.AppendLine(@"Error: Line format was incorrect and was not matched. ");
  242:                                             //stringBuilder.AppendLine(" ");
  243:                                         }
  244:                                     }
  245:                                 }
  246:                             }
  247:                             else
  248:                             {
  249:                                 stringBuilder.AppendLine("Error: Operand is empty. ");
  250:                                 stringBuilder.AppendLine(" ");
  251:                             }
  252:                         }
  253:  
  254:                         responseContent += stringBuilder.ToString();
  255:                         responseContent += "\r\n";
  256:                         //content += "\r\nResult: " + result.Message;
  257:  
  258:                         responseContent += "\r\n";
  259:                         responseContent += "\r\n";
  260:                         responseContent += @"Help? Send email with subject ""mail/provision/access/help"". ";
  261:                         responseContent += "\r\n";
  262:                         responseContent += "\r\n";
  263:                     }
  264:                     else
  265:                     {
  266:                         responseContent += "\r\n";
  267:                         responseContent += "You are not authorized to modify this value. ";
  268:                         responseContent += "\r\n";
  269:                     }
  270:                 }
  271:                 else if (opcode.StartsWith("mail/provision/access/read"))
  272:                 {
  273:                     responseContent += "\r\n";
  274:                     responseContent += "This opcode is not defined yet. ";
  275:                     responseContent += "\r\n";
  276:                 }
  277:                 else if (opcode.StartsWith("mail/provision/access/delete"))
  278:                 {
  279:                     if (Ia.Ftn.Cl.Models.Business.Authority.StaffContactCanCreateReadUpdateDeleteAccessList(Ia.Ftn.Cl.Models.Business.Authority.PersistentStorageFunction.Create, staffContact))
  280:                     {
  281:                         responseContent += @"Opcode: """ + opcode + @"""." + "\r\n";
  282:                         //content += @"Operand: """ + operand + @"""." + "\r\n";
  283:                         responseContent += "\r\n";
  284:  
  285:                         stringBuilder = new StringBuilder(10000);
  286:  
  287:                         using (StringReader reader = new StringReader(operand))
  288:                         {
  289:                             if (operand.Length > 0)
  290:                             {
  291:                                 while ((line = reader.ReadLine()) != null)
  292:                                 {
  293:                                     if (!string.IsNullOrEmpty(line)) // skip empty lines
  294:                                     {
  295:                                         nddOnt = Ia.Ftn.Cl.Models.Business.Default.NddOntUsingExtractedAccessNameWithValidSymbolAndLegalFormatForPonAndOntFromValue(line);
  296:  
  297:                                         if (nddOnt != null)
  298:                                         {
  299:                                             Ia.Ftn.Cl.Models.Business.Access.Delete(Ia.Ftn.Cl.Models.Business.MessageQueue.Application.EmailApplication, nddOnt.Access.Name, staffContact.StaffIdentityUser.Id, out documentValidityResult);
  300:  
  301:                                             //Ia.Ftn.Cl.Model.Data.MessageQueue.AccessNameQueue.ProvisionAccessQueue.Enqueue(nddOnt.Access.Name);
  302:  
  303:                                             stringBuilder.AppendLine(@"> [" + line.Trim() + @"]");
  304:                                             stringBuilder.AppendLine(documentValidityResult.Message);
  305:                                             stringBuilder.AppendLine(" ");
  306:                                         }
  307:                                         else
  308:                                         {
  309:                                             stringBuilder.AppendLine(@"> [" + line.Trim() + @"]");
  310:                                             stringBuilder.AppendLine(@"Error: Network design document does not recognize the access name " + line + ". Access vendor is undefined. ");
  311:                                             stringBuilder.AppendLine(" ");
  312:                                         }
  313:                                     }
  314:                                 }
  315:                             }
  316:                             else
  317:                             {
  318:                                 stringBuilder.AppendLine("Error: Operand is empty. ");
  319:                                 stringBuilder.AppendLine(" ");
  320:                             }
  321:                         }
  322:  
  323:                         responseContent += stringBuilder.ToString();
  324:                         responseContent += "\r\n";
  325:                         //content += "\r\nResult: " + result.Message;
  326:  
  327:                         responseContent += "\r\n";
  328:                         responseContent += "\r\n";
  329:                         responseContent += @"Help? Send email with subject ""mail/provision/access/help"". ";
  330:                         responseContent += "\r\n";
  331:                         responseContent += "\r\n";
  332:                     }
  333:                     else
  334:                     {
  335:                         responseContent += "\r\n";
  336:                         responseContent += "You are not authorized to delete this value. ";
  337:                         responseContent += "\r\n";
  338:                     }
  339:                 }
  340:                 else
  341:                 {
  342:                     responseContent += "\r\n";
  343:                     responseContent += "This opcode is not known. ";
  344:                     responseContent += "\r\n";
  345:                 }
  346:             }
  347:         }
  348:  
  349:         /////////////////////////////////////////////////////////////////////////////////
  350:  
  351:         /// <summary>
  352:         ///
  353:         /// </summary>
  354:         private static bool ParseLine(string line, ref StringBuilder stringBuilder, out string accessName, out string kuwaitFtnAreaSymbol, out string block, out string street, out string premisesOld, out string premisesNew, out string ontSerialNumber, out string ip, out string ontEquipmentTypeString, out string odf, out string paci)
  355:         {
  356:             bool matchSuccess;
  357:             int slNo, pon, pon2, pon3;
  358:             string accessName2, areaSymbol;
  359:             Match match;
  360:  
  361:             accessName = kuwaitFtnAreaSymbol = block = street = premisesOld = premisesNew = ontSerialNumber = ip = ontEquipmentTypeString = odf = paci = string.Empty;
  362:  
  363:             // parse Huawei submittal line
  364:             match = Regex.Match(line, @"(\d+?)\t(\d+?)\t(\w\w\w)\.(\d+?)\.(\d+?)\t(\w\w\w)\.(\d+?)\.(\d+?)\t(.*?)\t(\w\w\w)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)$");
  365:             // [5  1126  SMC.1126.002      SMC.1126.002      SHX011      SMC   1     NA    5      PUBLICSERVICCO    18032043    4857544390755A78  10.150.131.34     NA    66081089      MA5616-96]
  366:             if (match.Success)
  367:             {
  368:                 slNo = int.Parse(match.Groups[1].Value);
  369:                 pon = int.Parse(match.Groups[2].Value);
  370:                 pon2 = int.Parse(match.Groups[4].Value);
  371:                 pon3 = int.Parse(match.Groups[7].Value);
  372:  
  373:                 if (pon == pon2 && pon == pon3 && pon2 == pon3)
  374:                 {
  375:                     accessName = match.Groups[3].Value + "." + match.Groups[4].Value + "." + match.Groups[5].Value;
  376:                     accessName2 = match.Groups[6].Value + "." + match.Groups[7].Value + "." + match.Groups[8].Value;
  377:  
  378:                     kuwaitFtnAreaSymbol = match.Groups[10].Value;
  379:  
  380:                     if (accessName == accessName2 && accessName.StartsWith(kuwaitFtnAreaSymbol))
  381:                     {
  382:                         //mhNo = match.Groups[9].Value;
  383:                         block = match.Groups[11].Value;
  384:                         premisesNew = match.Groups[12].Value;
  385:                         street = match.Groups[13].Value;
  386:                         premisesOld = match.Groups[14].Value;
  387:                         paci = match.Groups[15].Value;
  388:                         ontSerialNumber = match.Groups[16].Value;
  389:                         ip = match.Groups[17].Value;
  390:                         ontEquipmentTypeString = match.Groups[20].Value;
  391:                         //odfPort = match.Groups[19].Value;
  392:                         //oltPort = match.Groups[20].Value;
  393:  
  394:                         matchSuccess = true;
  395:                     }
  396:                     else
  397:                     {
  398:                         stringBuilder.AppendLine(@"> [" + line.Trim() + @"]");
  399:                         stringBuilder.AppendLine(@"Error: TB.ID, ONT ID, and/or area symbol values don't match in line. ");
  400:                         stringBuilder.AppendLine(" ");
  401:  
  402:                         matchSuccess = false;
  403:                     }
  404:                 }
  405:                 else
  406:                 {
  407:                     stringBuilder.AppendLine(@"> [" + line.Trim() + @"]");
  408:                     stringBuilder.AppendLine(@"Error: Inconsistent PON (" + pon + "), TB.ID (" + pon2 + ") and ONT ID (" + pon3 + ") values in line. ");
  409:                     stringBuilder.AppendLine(" ");
  410:  
  411:                     matchSuccess = false;
  412:                 }
  413:             }
  414:             else
  415:             {
  416:                 // parse Nokia submittal line
  417:                 match = Regex.Match(line, @"([a-zA-Z]{3})\.(\d{1,4})\.(\d{1,3})\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.*?)\t(.+?)$");
  418:  
  419:                 if (match.Success)
  420:                 {
  421:                     areaSymbol = match.Groups[1].Value;
  422:                     kuwaitFtnAreaSymbol = areaSymbol;
  423:  
  424:                     accessName = areaSymbol + "." + match.Groups[2].Value + "." + match.Groups[3].Value;
  425:  
  426:                     premisesOld = match.Groups[6].Value;
  427:                     premisesNew = match.Groups[7].Value;
  428:                     street = match.Groups[5].Value;
  429:                     block = match.Groups[4].Value;
  430:                     paci = match.Groups[8].Value;
  431:  
  432:                     ontSerialNumber = match.Groups[9].Value;
  433:                     ip = string.Empty;
  434:                     ontEquipmentTypeString = match.Groups[10].Value;
  435:  
  436:                     matchSuccess = true;
  437:                 }
  438:                 else
  439:                 {
  440:                     stringBuilder.AppendLine(@"> [" + line.Trim() + @"]");
  441:                     stringBuilder.AppendLine(@"Error: Line format was incorrect and was not matched. ");
  442:                     stringBuilder.AppendLine(" ");
  443:  
  444:                     matchSuccess = false;
  445:                 }
  446:             }
  447:  
  448:             return matchSuccess;
  449:         }
  450:  
  451:         ////////////////////////////////////////////////////////////////////////////
  452:         ////////////////////////////////////////////////////////////////////////////
  453:     }
  454: }