using LeanCloud.Common;
using LeanCloud.Storage.Internal;
using LeanCloud.Storage.Internal.Persistence;
namespace LeanCloud {
///
/// LCApplication contains static functions that handle global configuration
/// for LeanCloud services.
///
public class LCApplication {
///
/// Uses the master key or not.
/// The default is false.
///
public static bool UseMasterKey {
get => LCCore.UseMasterKey;
set {
LCCore.UseMasterKey = value;
}
}
///
/// Initialize LeanCloud services.
///
/// The application id provided in LeanCloud dashboard.
/// The application key provided in LeanCloud dashboard.
/// The server url, typically consist of your own domain.
/// The application master key provided in LeanCloud dashboard.
public static void Initialize(string appId,
string appKey,
string server = null,
string masterKey = null) {
LCLogger.Debug("Application Initializes on Unity.");
LCStorage.Initialize(appId, appKey, server, masterKey);
LCCore.PersistenceController = new PersistenceController(new UnityPersistence());
}
}
}