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 bound by yourself. /// 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()); } } }