コード例 #1
0
 internal static EventClient GetDefaultEventClient(InstanceContext ctx)
 {
     if (string.Equals(UserSettings.AutoSyncServerHost, "localhost", StringComparison.OrdinalIgnoreCase))
     {
         return(EventClient.GetNamedPipesClient(ctx));
     }
     else
     {
         return(EventClient.GetNetTcpClient(ctx, UserSettings.AutoSyncServerHost, UserSettings.AutoSyncServerPort, UserSettings.AutoSyncServerIdentity));
     }
 }
コード例 #2
0
 internal static EventClient GetDefaultEventClient(InstanceContext ctx)
 {
     if (App.IsConnectedToLocalhost())
     {
         return(EventClient.GetNamedPipesClient(ctx));
     }
     else
     {
         return(EventClient.GetNetTcpClient(ctx, UserSettings.AutoSyncServerHost, UserSettings.AutoSyncServerPort, UserSettings.AutoSyncServerIdentity));
     }
 }