@@ -141,24 +141,24 @@ public static void SetSwitch(string switchName, bool isEnabled)
141
141
}
142
142
}
143
143
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 )
146
146
{
147
147
Debug . Assert ( s_dataStore == null , "s_dataStore is not expected to be inited before Setup is called" ) ;
148
148
s_dataStore = new Dictionary < string , object ? > ( count ) ;
149
149
for ( int i = 0 ; i < count ; i ++ )
150
150
{
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 ] ) ) ;
152
152
}
153
153
}
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 )
156
156
{
157
157
Debug . Assert ( s_dataStore == null , "s_dataStore is not expected to be inited before Setup is called" ) ;
158
158
s_dataStore = new Dictionary < string , object ? > ( count ) ;
159
159
for ( int i = 0 ; i < count ; i ++ )
160
160
{
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 ] ) ) ;
162
162
}
163
163
}
164
164
#endif
0 commit comments