Ejemplo n.º 1
0
        public static ILoggerFactory GetLoggerFactory()
        {
            var myLoggerFactory = new MyLoggerFactory();

            myLoggerFactory.DefaultLogger.LogHelper.ShowMessage = s =>
            {
                AsyncFormEventBus.Raise(new AsyncFormMessageEvent(s));
            };
            return(_logFactory ?? (_logFactory = myLoggerFactory));
        }
Ejemplo n.º 2
0
    // Start is called before the first frame update
    void Start()
    {
        var endpoint = new UriEndPoint(new Uri("https://localhost:44340/rfch"));

        MyLoggerFactory loggerFactory = new MyLoggerFactory();

        _connection = new HubConnection(
            new HttpConnectionFactory(new MyOptions(), loggerFactory),
            new JsonHubProtocol(),
            endpoint,
            new MyServiceProvider(),
            loggerFactory);

        _connection.StartAsync().ConfigureAwait(false);
    }
Ejemplo n.º 3
0
 public void Clean()
 {
     MyLoggerFactory.Clear();
 }
 static ClassWithExistingField()
 {
     existingLogger = MyLoggerFactory.GetLogger <ClassWithExistingField>();
 }