@@ -159,7 +159,7 @@ protected void EnsureOwnerIsNotRemoved()
159159 if ( Owner . IsRemoved )
160160 throw new InvalidOperationException ( Strings . ExEntityIsRemoved ) ;
161161 }
162-
162+
163163 #region System-level event-like members
164164
165165 private void SystemInitialize ( )
@@ -369,7 +369,7 @@ protected void NotifyCollectionChanged(NotifyCollectionChangedAction action, Ent
369369 var subscriptionInfo = GetSubscription ( EntityEventBroker . CollectionChangedEventKey ) ;
370370 if ( subscriptionInfo . Second != null ) {
371371 var handler = ( NotifyCollectionChangedEventHandler ) subscriptionInfo . Second ;
372- if ( action == NotifyCollectionChangedAction . Reset )
372+ if ( action == NotifyCollectionChangedAction . Reset )
373373 handler . Invoke ( this , new NotifyCollectionChangedEventArgs ( action ) ) ;
374374 else if ( ! index . HasValue ) {
375375 if ( action == NotifyCollectionChangedAction . Remove ) {
@@ -378,11 +378,11 @@ protected void NotifyCollectionChanged(NotifyCollectionChangedAction action, Ent
378378 foreach ( var @delegate in invocationList ) {
379379 var typedDelegate = ( NotifyCollectionChangedEventHandler ) @delegate ;
380380 var subscriberAssemblyName = @delegate . Method . DeclaringType . Assembly . FullName ;
381- if ( subscriberAssemblyName . StartsWith ( presentationFrameworkAssemblyPrefix ) )
381+ if ( subscriberAssemblyName . StartsWith ( presentationFrameworkAssemblyPrefix , StringComparison . Ordinal ) )
382382 // WPF can't handle "Remove" event w/o item index
383383 typedDelegate . Invoke ( this , new NotifyCollectionChangedEventArgs ( NotifyCollectionChangedAction . Reset ) ) ;
384384#if DEBUG
385- else if ( subscriberAssemblyName . StartsWith ( storageTestsAssemblyPrefix ) )
385+ else if ( subscriberAssemblyName . StartsWith ( storageTestsAssemblyPrefix , StringComparison . Ordinal ) )
386386 typedDelegate . Invoke ( this , new NotifyCollectionChangedEventArgs ( NotifyCollectionChangedAction . Reset ) ) ;
387387#endif
388388 else
@@ -543,15 +543,15 @@ internal bool Add(Entity item, SyncContext syncContext, RemovalContext removalCo
543543 Session . EntitySetChangeRegistry . Register ( state ) ;
544544 index = GetItemIndex ( state , itemKey ) ;
545545 } ;
546-
546+
547547 operations . NotifyOperationStarting ( ) ;
548548 if ( association . IsPaired )
549- Session . PairSyncManager . ProcessRecursively ( syncContext , removalContext ,
549+ Session . PairSyncManager . ProcessRecursively ( syncContext , removalContext ,
550550 OperationType . Add , association , Owner , item , finalizer ) ;
551551 else
552552 finalizer . Invoke ( ) ;
553553
554- // removalContext is unused here, since Add is never
554+ // removalContext is unused here, since Add is never
555555 // invoked in reference cleanup process directly
556556
557557 if ( ! skipOwnerVersionChange )
@@ -626,7 +626,7 @@ internal bool Remove(Entity item, SyncContext syncContext, RemovalContext remova
626626 removalContext . EnqueueFinalizer ( ( ) => {
627627 try {
628628 try {
629- index = GetItemIndex ( State , itemKey ) ; // Necessary, since index can be already changed
629+ index = GetItemIndex ( State , itemKey ) ; // Necessary, since index can be already changed
630630 if ( ! skipOwnerVersionChange )
631631 Owner . UpdateVersionInfo ( Owner , Field ) ;
632632 SystemRemove ( item , index ) ;
@@ -662,7 +662,7 @@ internal bool Remove(Entity item, SyncContext syncContext, RemovalContext remova
662662 throw ;
663663 }
664664 }
665-
665+
666666 /// <summary>
667667 /// Clears this collection.
668668 /// </summary>
@@ -814,8 +814,8 @@ private bool Contains(Key key, Entity item)
814814 if ( foundInCache )
815815 return true ;
816816 var ownerState = Owner . PersistenceState ;
817- var itemState = item == null
818- ? PersistenceState . Synchronized
817+ var itemState = item == null
818+ ? PersistenceState . Synchronized
819819 : item . PersistenceState ;
820820 if ( PersistenceState . New . In ( ownerState , itemState ) || State . IsFullyLoaded )
821821 return false ;
@@ -897,7 +897,7 @@ private static EntitySetTypeState BuildEntitySetTypeState(object key, EntitySetB
897897 ArrayUtils < Type > . EmptyArray ) ;
898898 return new EntitySetTypeState ( seek , seekTransform , itemCtor , entitySet . GetItemCountQueryDelegate ( field ) ) ;
899899 }
900-
900+
901901 private int ? GetItemIndex ( EntitySetState state , Key key )
902902 {
903903 if ( ! state . IsFullyLoaded )
@@ -908,7 +908,7 @@ private static EntitySetTypeState BuildEntitySetTypeState(object key, EntitySetB
908908 if ( subscriptionInfo . Second == null )
909909 return null ;
910910
911- // Ok, it seems there is a reason
911+ // Ok, it seems there is a reason
912912 // to waste linear time on calculating this...
913913 int i = 0 ;
914914 foreach ( var cachedKey in state ) {
@@ -930,7 +930,7 @@ internal static void ExecuteOnValidate(EntitySetBase target)
930930 // Initialization
931931
932932 /// <summary>
933- /// Performs initialization (see <see cref="Initialize()"/>) of the <see cref="EntitySetBase"/>
933+ /// Performs initialization (see <see cref="Initialize()"/>) of the <see cref="EntitySetBase"/>
934934 /// if type of <see langword="this" /> is the same as <paramref name="ctorType"/>.
935935 /// Automatically invoked in the epilogue of any constructor of this type and its ancestors.
936936 /// </summary>
0 commit comments