Exemple #1
0
 // All must be set except for configDir_str
 static void EnableMicrosoftTelemetry(string appBundleID_str, string appSignature_str, string appVersion_str, string merpGUIPath_str, string unused /* eventType_str */, string appPath_str, string configDir_str)
 {
     if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
     {
         using (var appBundleID_chars = RuntimeMarshal.MarshalString(appBundleID_str))
             using (var appSignature_chars = RuntimeMarshal.MarshalString(appSignature_str))
                 using (var appVersion_chars = RuntimeMarshal.MarshalString(appVersion_str))
                     using (var merpGUIPath_chars = RuntimeMarshal.MarshalString(merpGUIPath_str))
                         using (var appPath_chars = RuntimeMarshal.MarshalString(appPath_str))
                             using (var configDir_chars = RuntimeMarshal.MarshalString(configDir_str))
                             {
                                 EnableMicrosoftTelemetry_internal(appBundleID_chars.Value, appSignature_chars.Value, appVersion_chars.Value, merpGUIPath_chars.Value, appPath_chars.Value, configDir_chars.Value);
                             }
     }
     else
     {
         throw new PlatformNotSupportedException("Merp support is currently only supported on OSX.");
     }
 }