프로젝트

일반

사용자정보

개정판 71ba1ca3

ID71ba1ca3cfa2532732a662267bc9dbdc3f7197e7
상위 0860c756
하위 c85bd0fc, fb386b8c

gaqhf 이(가) 5년 이상 전에 추가함

dev issue #000 : fix bug

Change-Id: I254e19b9c8f4ca7d618d9542c0190bb47fa87edc

차이점 보기:

DTI_PID/SPPIDConverter/Util/SPPIDUtil.cs
388 388

  
389 389
            return null;
390 390
        }
391

  
392
        public static Symbol FindSymbolByRepresentationID(Document document, string repID)
393
        {
394
            Symbol findSymbol = null;
395
            foreach (var symbol in document.SYMBOLS)
396
            {
397
                if (symbol.SPPID.RepresentationId == repID)
398
                {
399
                    findSymbol = symbol;
400
                }
401
                else
402
                {
403
                    ChildSymbol childSymbol = FindChildSymbolByRepresentationID(document, symbol, repID);
404
                    if (childSymbol != null)
405
                        findSymbol = symbol;
406
                }
407

  
408
                if (findSymbol != null)
409
                    break;
410
            }
411

  
412
            return findSymbol;
413
        }
414

  
415
        public static ChildSymbol FindChildSymbolByRepresentationID(Document document, Symbol symbol, string repID)
416
        {
417
            ChildSymbol childSymbol = null;
418

  
419
            foreach (ChildSymbol loopChild in symbol.ChildSymbols)
420
            {
421
                if (loopChild.SPPID.RepresentationId == repID)
422
                {
423
                    childSymbol = loopChild;
424
                    break;
425
                }
426
                else
427
                {
428
                    childSymbol = FindChildSymbolByRepresentationIDLoop(document, repID, loopChild);
429
                    if (childSymbol != null)
430
                        break;
431
                }
432
            }
433

  
434
            return childSymbol;
435
        }
436

  
437
        private static ChildSymbol FindChildSymbolByRepresentationIDLoop(Document document, string repID, ChildSymbol childSymbol)
438
        {
439
            ChildSymbol findChild = null;
440

  
441
            foreach (var item in childSymbol.ChildSymbols)
442
            {
443
                if (item.SPPID.RepresentationId == repID)
444
                {
445
                    findChild = item;
446
                    break;
447
                }
448
                else
449
                {
450
                    findChild = FindChildSymbolByRepresentationIDLoop(document, repID, item);
451
                    if (findChild != null)
452
                        break;
453
                }
454
            }
455

  
456
            return findChild;
457
        }
391 458
    }
392 459
}

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)