﻿// Decompiled with JetBrains decompiler
// Type: Wb.Lpw.Shared.Network.NetworkCore
// Assembly: Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 19851F1B-4780-4223-BA01-2C20F2CD781E
// Assembly location: C:\Users\CGA Computer\Desktop\LEGO Universe Stuff\LOCO Server\Unity Web Player Extractor\Saved Files\LOCO Server.unity3d_unpacked\Assembly-CSharp.dll

using System;
using Wb.Lpw.Platform.Client;
using Wb.Lpw.Platform.Protocol;

namespace Wb.Lpw.Shared.Network
{
  public class NetworkCore : IDisposable
  {
    private Client _client;

    public PhotonUri CurrentServer { get; private set; }

    public PhotonUri ConnectingServer { get; private set; }

    public NetworkCore(Client client)
    {
      this._client = client;
    }

    public void Dispose()
    {
      this.CurrentServer = (PhotonUri) null;
      this.ConnectingServer = (PhotonUri) null;
      this._client = (Client) null;
    }

    public void CancelReservation(PublicDestination destination, Action<CancelDestinationResult> cancelDestinationResultAction)
    {
      this._client.CancelDestination(destination, cancelDestinationResultAction);
    }

    public void JoinServer(PhotonUri photonUri, Action<OperationResult> joinServerResultAction, ClientObservers clientObservers)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: reference to a compiler-generated method
      Action<OperationResult> action = new Action<OperationResult>(new NetworkCore.\u003CJoinServer\u003Ec__AnonStorey21B()
      {
        joinServerResultAction = joinServerResultAction,
        \u003C\u003Ef__this = this
      }.\u003C\u003Em__227);
      this.ConnectingServer = photonUri;
      this._client.JoinServer(photonUri, clientObservers, action);
    }

    public void LeaveServer(Action leaveServerResultAction)
    {
      // ISSUE: object of a compiler-generated type is created
      // ISSUE: reference to a compiler-generated method
      this._client.LeaveServer(new Action(new NetworkCore.\u003CLeaveServer\u003Ec__AnonStorey21C()
      {
        leaveServerResultAction = leaveServerResultAction,
        \u003C\u003Ef__this = this
      }.\u003C\u003Em__228));
    }
  }
}
