File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1329,12 +1329,15 @@ public virtual T this[int index]
13291329 /// </remarks>
13301330 public int IndexOf ( T obj )
13311331 {
1332- lock ( SyncRoot )
1332+ if ( obj != null )
13331333 {
1334- // No need to fluff items up!
1335- for ( int i = 0 ; i < m_items . Count ; i ++ )
1336- if ( m_items [ i ] . Id == obj . Id )
1337- return i ;
1334+ lock ( SyncRoot )
1335+ {
1336+ // No need to fluff items up!
1337+ for ( int i = 0 ; i < m_items . Count ; i ++ )
1338+ if ( m_items [ i ] . Id == obj . Id )
1339+ return i ;
1340+ }
13381341 }
13391342 return - 1 ;
13401343 }
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ public virtual IAnalysis Analysis
5656 {
5757 get
5858 {
59- if ( Index < Segment . AnalysesRS . Count )
59+ if ( Segment ? . AnalysesRS != null && Index < Segment . AnalysesRS . Count )
6060 return Segment . AnalysesRS [ Index ] ;
6161 return null ;
6262 }
Original file line number Diff line number Diff line change @@ -366,10 +366,7 @@ internal partial class ConstituentChartCellPartRepository
366366 /// </summary>
367367 public IEnumerable < IConstituentChartCellPart > InstancesWithChartCellColumn ( ICmPossibility target )
368368 {
369- ( ( ICmObjectRepositoryInternal ) m_cache . ServiceLocator . ObjectRepository ) . EnsureCompleteIncomingRefsFrom (
370- ConstituentChartCellPartTags . kflidColumn ) ;
371- return ( ( ICmObjectInternal ) target ) . IncomingRefsFrom ( ConstituentChartCellPartTags . kflidColumn ) . Cast
372- < IConstituentChartCellPart > ( ) ;
369+ return AllInstances ( ) . Where ( cccp => cccp . ColumnRA == target ) ;
373370 }
374371 }
375372 #endregion
You can’t perform that action at this time.
0 commit comments