chore: 支持 master key
parent
a4eb9dfa0c
commit
1171f4b0de
|
@ -22,6 +22,10 @@ namespace LeanCloud {
|
|||
get; private set;
|
||||
}
|
||||
|
||||
public static string MasterKey {
|
||||
get; private set;
|
||||
}
|
||||
|
||||
public static bool UseProduction {
|
||||
get; set;
|
||||
}
|
||||
|
@ -34,7 +38,14 @@ namespace LeanCloud {
|
|||
get; private set;
|
||||
}
|
||||
|
||||
public static void Initialize(string appId, string appKey, string server = null) {
|
||||
public static bool UseMasterKey {
|
||||
get; set;
|
||||
}
|
||||
|
||||
public static void Initialize(string appId,
|
||||
string appKey,
|
||||
string masterKey = null,
|
||||
string server = null) {
|
||||
if (string.IsNullOrEmpty(appId)) {
|
||||
throw new ArgumentException(nameof(appId));
|
||||
}
|
||||
|
@ -44,6 +55,7 @@ namespace LeanCloud {
|
|||
|
||||
AppId = appId;
|
||||
AppKey = appKey;
|
||||
MasterKey = masterKey;
|
||||
|
||||
// 注册 LeanCloud 内部子类化类型
|
||||
LCObject.RegisterSubclass(LCUser.CLASS_NAME, () => new LCUser());
|
||||
|
|
Loading…
Reference in New Issue