コード例 #1
0
 private static IAadClient CreateAadClient(OrganizationId organizationId, GraphProxyVersions graphProxyVersion)
 {
     if (TestHooks.GraphApi_GetAadClient != null)
     {
         return(TestHooks.GraphApi_GetAadClient(organizationId));
     }
     return(AADClientFactory.Create(organizationId, graphProxyVersion));
 }
コード例 #2
0
 public static void LogEvent(ExEventLog.EventTuple tuple, params string[] messageArgs)
 {
     AirSyncDiagnostics.TraceInfo <uint>(ExTraceGlobals.ProtocolTracer, null, "LogEvent eventId:{0}", tuple.EventId);
     if (messageArgs != null)
     {
         for (int i = 0; i < messageArgs.Length; i++)
         {
             if (messageArgs[i].Length > 32000)
             {
                 messageArgs[i] = messageArgs[i].Remove(32000).TrimEnd(new char[0]);
             }
         }
     }
     if (TestHooks.EventLog_LogEvent != null)
     {
         TestHooks.EventLog_LogEvent(tuple, null, messageArgs);
         return;
     }
     if (!AirSyncDiagnostics.eventLogger.LogEvent(tuple, null, messageArgs))
     {
         AirSyncDiagnostics.TraceError <uint>(ExTraceGlobals.ProtocolTracer, null, "Failed to log event {0}", tuple.EventId);
     }
 }