@@ -141,24 +141,24 @@ public static void SetSwitch(string switchName, bool isEnabled)
141141 }
142142 }
143143
144- #if ! NATIVEAOT
145- internal static unsafe void Setup ( char * * pNames , char * * pValues , int count )
144+ #if MONO
145+ internal static unsafe void Setup ( char * * pNames , uint * pNameLengths , char * * pValues , uint * pValueLengths , int count )
146146 {
147147 Debug . Assert ( s_dataStore == null , "s_dataStore is not expected to be inited before Setup is called" ) ;
148148 s_dataStore = new Dictionary < string , object ? > ( count ) ;
149149 for ( int i = 0 ; i < count ; i ++ )
150150 {
151- s_dataStore . Add ( new string ( pNames [ i ] ) , new string ( pValues [ i ] ) ) ;
151+ s_dataStore . Add ( new string ( pNames [ i ] , 0 , ( int ) pNameLengths [ i ] ) , new string ( pValues [ i ] , 0 , ( int ) pValueLengths [ i ] ) ) ;
152152 }
153153 }
154-
155- internal static unsafe void Setup ( char * * pNames , uint * pNameLengths , char * * pValues , uint * pValueLengths , int count )
154+ #elif ! NATIVEAOT
155+ internal static unsafe void Setup ( char * * pNames , char * * pValues , int count )
156156 {
157157 Debug . Assert ( s_dataStore == null , "s_dataStore is not expected to be inited before Setup is called" ) ;
158158 s_dataStore = new Dictionary < string , object ? > ( count ) ;
159159 for ( int i = 0 ; i < count ; i ++ )
160160 {
161- s_dataStore . Add ( new string ( pNames [ i ] , 0 , ( int ) pNameLengths [ i ] ) , new string ( pValues [ i ] , 0 , ( int ) pValueLengths [ i ] ) ) ;
161+ s_dataStore . Add ( new string ( pNames [ i ] ) , new string ( pValues [ i ] ) ) ;
162162 }
163163 }
164164#endif
0 commit comments