Commit 2d8b71a
feat: Integrated ODPManager with UserContext and Optimizely client (#323)
* Include ODP Manager instantiation in Optimizely.cs
Includes lint/format updates...Sorry PR-Reviewer :-/
* Add FetchQualifiedSegments to Optimizely.cs
* Add FetchQualifiedSegments to UserContext
* Add IdentifyUser, fetch segments callback, & docs
* WIP existing test fixes
* Fix legacy test (mock) constructors
* Add SendOdpEvent to Optimizely
* WIP Init OdpManager
* WIP Add OptimizelySdkSettings & fix some legacy tests
* WIP fixes
* Remove early UpdateOdpSettings
* Add internal accessor for ProjectConfig Segments
Sorry for the linter formatting updates
* Linter fixes
* Preprocessing conditional compilation directives
* Add Segments array to ProjectConfig
* Lint corrections
* More linter fixes
hopefully ;-)
* WIP PR review changes
* Lint fix
* Lint fix
* Add async FetchQualifiedSegments
* WIP parse TypedAudience to ODP Segments
* WIP parsing Segments
* More ODP test datafile more scenarios
* Revert IMultipleConditions concept
* Correct Segments from datafile
* Lint fix
* Add segment unit tests
* WIP satisfying legacy tests
* Remove Ignore from legacy tests
* Finalize SetupOdp; add Dispose to OptimizelyUserContext
* Add missing preprocessing conditions
* Fix linting
* PR code review updates
* Lint fixes
* feat: Fix NotificationCenter Issue for ODPManager (#324)
* PR changes
* More PR changes
* proposed changes
* Understanding & additional updates
* WIP Refactors & test fixes
* WIP correcting tests...
* Refactors
* WIP OdpEventManagerTest resolutions
* Remove NotificationCenter from NotificationCenterRegistry on Dispose
* Fix Disposed = true location
* Modify NCR Dispose
* Mods to NCR and NC disposal
* Mods to NCR and NC disposal
* Fix OdpEventManager & tests
* Remove double lock in NotificationCenterRegistry
* Fix final test corrections
* Pass logger into NotificationCenterRegistry
* Last PR change request
* Remove TODO comments
Co-authored-by: msohailhussain <sohail.mirza@SMirza-MBP.local>
* Lint fixes + Copyright year updates
* Lint fix PollingProjectConfigManager
* Trying to fix TestPollingConfigManagerBlocksWhenProjectConfigIsNotProvided
* Another attempt to figure out TestPollingConfigManagerBlocksWhenProjectConfigIsNotProvided
* Update OptimizelySDK/Config/PollingProjectConfigManager.cs
Co-authored-by: Muhammad Noman <Muhammadnoman@folio3.com>
* Update OptimizelySDK/Config/HttpProjectConfigManager.cs
Co-authored-by: Muhammad Noman <Muhammadnoman@folio3.com>
* Update OptimizelySDK/Config/FallbackProjectConfigManager.cs
Co-authored-by: Muhammad Noman <Muhammadnoman@folio3.com>
* Update OptimizelySDK/Config/FallbackProjectConfigManager.cs
Co-authored-by: Muhammad Noman <Muhammadnoman@folio3.com>
* Implement a NoOpOdpManager
* Remove configurable batch size for OdpEventManager
* Fix lint (Mike not happy)
* OMG Linter needs config
* Split condition for UpdateSettings & NotificationCenterRegistry add
* Remove optional chaining
* PR review changes
* Fix InternalsVisibleTo & use internal for testing
* PR change requests
* Add unit test for defaults from OdpManager & below
* Remove NoOpOdpManager & default OdpManager instantiation
* Lint fixes
* Allow signed + assigned friend assemblies
* Use pubkey of OptimizelySDK.Tests
* Testing InternalsVisibleTo in csproj
* More testing signed assems
* WIP fix InternalsVisibleTo with Release build
* Require providing SDK key in HttpProjectConfigManager constructor
* Fix: Some suggested changes related to ODP (#325)
* Some suggested changes to fix null pointer exception
* - Removed batchsize support from ODP event manager
- Made some general fixes
* Flush previous event
* reverting this change
Co-authored-by: mnoman09 <m.nomanshoaib09@gmail.com>
* Merge fixes + lint
* Lint fixes
* Build fix and lint
* PR change requests
* Lint fix
* Fix: ODP Event manager not consistent in triggering events. (#326)
* Refactored OdpEventManager flushEvent function.
* To wait for events using flushInterval when eventBatch is not empty.
* Or wait indefinitely if no event is in batch until any event arrive.
* Avoid calling flush on shutdown if no events are present
* Avoid calling unnecessary flushQueue if _currentBatch.Count is zero.
* Fixed the test as when there are no remaining items in queue then odpEventManager should not flush.
* Removing mutex lock from notification registry instead using concurrentDictionary
* Revert "Removing mutex lock from notification registry instead using concurrentDictionary"
This reverts commit 64cdf80.
* Added Thread.sleep which somehow enabling thread to shutdown gracefully.
---------
Co-authored-by: mnoman09 <m.nomanshoaib09@gmail.com>
---------
Co-authored-by: msohailhussain <sohail.mirza@SMirza-MBP.local>
Co-authored-by: Muhammad Noman <Muhammadnoman@folio3.com>
Co-authored-by: mnoman09 <m.nomanshoaib09@gmail.com>1 parent bdaef7f commit 2d8b71a
File tree
38 files changed
+6991
-2797
lines changed- OptimizelySDK.NetStandard20
- OptimizelySDK.Tests
- AudienceConditionsTests
- ConfigTest
- OdpTests
- Properties
- Utils
- OptimizelySDK
- Config
- Entity
- Notifications
- Odp
- Entity
- Properties
38 files changed
+6991
-2797
lines changedLines changed: 81 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
13 | 91 | | |
14 | 92 | | |
15 | 93 | | |
| |||
223 | 301 | | |
224 | 302 | | |
225 | 303 | | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
226 | 307 | | |
227 | 308 | | |
228 | 309 | | |
| |||
Lines changed: 176 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
0 commit comments