@@ -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 ;
@@ -901,7 +901,7 @@ private static EntitySetTypeState BuildEntitySetTypeState(object key, EntitySetB
901901 ArrayUtils < Type > . EmptyArray ) ;
902902 return new EntitySetTypeState ( seek , seekTransform , itemCtor , entitySet . GetItemCountQueryDelegate ( field ) ) ;
903903 }
904-
904+
905905 private int ? GetItemIndex ( EntitySetState state , Key key )
906906 {
907907 if ( ! state . IsFullyLoaded )
@@ -912,7 +912,7 @@ private static EntitySetTypeState BuildEntitySetTypeState(object key, EntitySetB
912912 if ( subscriptionInfo . Second == null )
913913 return null ;
914914
915- // Ok, it seems there is a reason
915+ // Ok, it seems there is a reason
916916 // to waste linear time on calculating this...
917917 int i = 0 ;
918918 foreach ( var cachedKey in state ) {
@@ -934,7 +934,7 @@ internal static void ExecuteOnValidate(EntitySetBase target)
934934 // Initialization
935935
936936 /// <summary>
937- /// Performs initialization (see <see cref="Initialize()"/>) of the <see cref="EntitySetBase"/>
937+ /// Performs initialization (see <see cref="Initialize()"/>) of the <see cref="EntitySetBase"/>
938938 /// if type of <see langword="this" /> is the same as <paramref name="ctorType"/>.
939939 /// Automatically invoked in the epilogue of any constructor of this type and its ancestors.
940940 /// </summary>
0 commit comments