From a4be2b8bb553c11839ef2c93d9be883be5b071a8 Mon Sep 17 00:00:00 2001 From: oneRain Date: Mon, 19 Apr 2021 16:28:31 +0800 Subject: [PATCH 01/71] doc: storage --- Storage/Storage.Unity/Public/LCApplication.cs | 15 +++ Storage/Storage/Public/LCACL.cs | 90 +++++++++++++++- Storage/Storage/Public/LCCloud.cs | 7 ++ Storage/Storage/Public/LCFile.cs | 60 +++++++++++ .../Storage/Public/LCFollowersAndFollowees.cs | 15 +++ Storage/Storage/Public/LCFriendship.cs | 20 ++++ Storage/Storage/Public/LCFriendshipRequest.cs | 4 + Storage/Storage/Public/LCGeoPoint.cs | 33 ++++++ Storage/Storage/Public/LCHookObject.cs | 17 +++ Storage/Storage/Public/LCObject.cs | 102 ++++++++++++++++-- Storage/Storage/Public/LCQuery.cs | 69 +++++++++++- Storage/Storage/Public/LCRelation.cs | 21 +++- Storage/Storage/Public/LCRole.cs | 13 ++- Storage/Storage/Public/LCSMSClient.cs | 6 ++ Storage/Storage/Public/LCStatus.cs | 44 ++++++++ Storage/Storage/Public/LCStatusCount.cs | 9 ++ Storage/Storage/Public/LCStatusQuery.cs | 20 ++++ Storage/Storage/Public/LCStorage.cs | 3 +- Storage/Storage/Public/LCUser.cs | 15 +++ 19 files changed, 544 insertions(+), 19 deletions(-) diff --git a/Storage/Storage.Unity/Public/LCApplication.cs b/Storage/Storage.Unity/Public/LCApplication.cs index 56b7287..aa76d2f 100644 --- a/Storage/Storage.Unity/Public/LCApplication.cs +++ b/Storage/Storage.Unity/Public/LCApplication.cs @@ -3,7 +3,15 @@ using LeanCloud.Storage; using LeanCloud.Storage.Internal.Persistence; namespace LeanCloud { + /// + /// LCApplication contains static functions that handle global configuration + /// for LeanCloud services. + /// public class LCApplication { + /// + /// Whether or not ths SDK using master key. + /// Default is false. + /// public static bool UseMasterKey { get => LCCore.UseMasterKey; set { @@ -11,6 +19,13 @@ namespace LeanCloud { } } + /// + /// 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, diff --git a/Storage/Storage/Public/LCACL.cs b/Storage/Storage/Public/LCACL.cs index 3180eae..f504294 100644 --- a/Storage/Storage/Public/LCACL.cs +++ b/Storage/Storage/Public/LCACL.cs @@ -3,21 +3,28 @@ using System.Collections.Generic; namespace LeanCloud.Storage { /// - /// LeanCloud Access Control Lists. + /// LCACL is used to control which users and roles can access or modify + /// a particular object. Each LCObject can have its own LCObject. /// public class LCACL { const string PublicKey = "*"; const string RoleKeyPrefix = "role:"; - public Dictionary ReadAccess { + internal Dictionary ReadAccess { get; } = new Dictionary(); - public Dictionary WriteAccess { + internal Dictionary WriteAccess { get; } = new Dictionary(); + /// + /// Creates a LCACL that is allowed to read and write this object + /// for the user. + /// + /// The user. + /// public static LCACL CreateWithOwner(LCUser owner) { if (owner == null) { throw new ArgumentNullException(nameof(owner)); @@ -28,6 +35,9 @@ namespace LeanCloud.Storage { return acl; } + /// + /// Gets or sets whether the public is allowed to read this object. + /// public bool PublicReadAccess { get { return GetAccess(ReadAccess, PublicKey); @@ -36,6 +46,9 @@ namespace LeanCloud.Storage { } } + /// + /// Gets or sets whether the public is allowed to write this object. + /// public bool PublicWriteAccess { get { return GetAccess(WriteAccess, PublicKey); @@ -44,6 +57,14 @@ namespace LeanCloud.Storage { } } + /// + /// Gets whether the given user id is *explicitly* allowed to read this + /// object. Even if this returns false, the user may still be able to read + /// it if is true or a role that the user + /// belongs to has read access. + /// + /// The user ObjectId to check. + /// public bool GetUserIdReadAccess(string userId) { if (string.IsNullOrEmpty(userId)) { throw new ArgumentNullException(nameof(userId)); @@ -51,6 +72,11 @@ namespace LeanCloud.Storage { return GetAccess(ReadAccess, userId); } + /// + /// Set whether the given user id is allowed to read this object. + /// + /// The ObjectId of the user. + /// Whether the user has permission. public void SetUserIdReadAccess(string userId, bool value) { if (string.IsNullOrEmpty(userId)) { throw new ArgumentNullException(nameof(userId)); @@ -58,6 +84,13 @@ namespace LeanCloud.Storage { SetAccess(ReadAccess, userId, value); } + /// + /// Gets whether the given user id is *explicitly* allowed to write this + /// object. Even if this returns false, the user may still be able to write + /// it if is true or a role that the user + /// belongs to has read access. + /// + /// T public bool GetUserIdWriteAccess(string userId) { if (string.IsNullOrEmpty(userId)) { throw new ArgumentNullException(nameof(userId)); @@ -65,6 +98,11 @@ namespace LeanCloud.Storage { return GetAccess(WriteAccess, userId); } + /// + /// Set whether the given user id is allowed to write this object. + /// + /// The ObjectId of the user. + /// Whether the user has permission. public void SetUserIdWriteAccess(string userId, bool value) { if (string.IsNullOrEmpty(userId)) { throw new ArgumentNullException(nameof(userId)); @@ -72,6 +110,14 @@ namespace LeanCloud.Storage { SetAccess(WriteAccess, userId, value); } + /// + /// Gets whether the given user is *explicitly* allowed to read this + /// object. Even if this returns false, the user may still be able to read + /// it if is true or a role that the user + /// belongs to has read access. + /// + /// The user to check. + /// public bool GetUserReadAccess(LCUser user) { if (user == null) { throw new ArgumentNullException(nameof(user)); @@ -79,6 +125,11 @@ namespace LeanCloud.Storage { return GetUserIdReadAccess(user.ObjectId); } + /// + /// Set whether the given user is allowed to read this object. + /// + /// The user. + /// Whether the user has permission. public void SetUserReadAccess(LCUser user, bool value) { if (user == null) { throw new ArgumentNullException(nameof(user)); @@ -86,6 +137,14 @@ namespace LeanCloud.Storage { SetUserIdReadAccess(user.ObjectId, value); } + /// + /// Gets whether the given user is *explicitly* allowed to write this + /// object. Even if this returns false, the user may still be able to write + /// it if is true or a role that the user + /// belongs to has write access. + /// + /// The user to check. + /// public bool GetUserWriteAccess(LCUser user) { if (user == null) { throw new ArgumentNullException(nameof(user)); @@ -93,6 +152,11 @@ namespace LeanCloud.Storage { return GetUserIdWriteAccess(user.ObjectId); } + /// + /// Set whether the given user is allowed to write this object. + /// + /// The user. + /// Whether the user has permission. public void SetUserWriteAccess(LCUser user, bool value) { if (user == null) { throw new ArgumentNullException(nameof(user)); @@ -100,6 +164,11 @@ namespace LeanCloud.Storage { SetUserIdWriteAccess(user.ObjectId, value); } + /// + /// Get whether the given role are allowed to read this object. + /// + /// The role to check. + /// public bool GetRoleReadAccess(LCRole role) { if (role == null) { throw new ArgumentNullException(nameof(role)); @@ -108,6 +177,11 @@ namespace LeanCloud.Storage { return GetAccess(ReadAccess, roleKey); } + /// + /// Sets whether the given role are allowed to read this object. + /// + /// The role. + /// Whether the role has access. public void SetRoleReadAccess(LCRole role, bool value) { if (role == null) { throw new ArgumentNullException(nameof(role)); @@ -116,6 +190,11 @@ namespace LeanCloud.Storage { SetAccess(ReadAccess, roleKey, value); } + /// + /// Get whether the given role are allowed to write this object. + /// + /// The role to check. + /// public bool GetRoleWriteAccess(LCRole role) { if (role == null) { throw new ArgumentNullException(nameof(role)); @@ -124,6 +203,11 @@ namespace LeanCloud.Storage { return GetAccess(WriteAccess, roleKey); } + /// + /// Sets whether the given role are allowed to write this object. + /// + /// The role. + /// Whether the role has access. public void SetRoleWriteAccess(LCRole role, bool value) { if (role == null) { throw new ArgumentNullException(nameof(role)); diff --git a/Storage/Storage/Public/LCCloud.cs b/Storage/Storage/Public/LCCloud.cs index e957dd4..a5dcb01 100644 --- a/Storage/Storage/Public/LCCloud.cs +++ b/Storage/Storage/Public/LCCloud.cs @@ -37,6 +37,13 @@ namespace LeanCloud.Storage { return response; } + /// + /// Invokes a cloud function. + /// + /// The type of return value. + /// Cloud function name. + /// Parameters of cloud function. + /// public static async Task Run(string name, Dictionary parameters = null) { Dictionary response = await Run(name, parameters); diff --git a/Storage/Storage/Public/LCFile.cs b/Storage/Storage/Public/LCFile.cs index 01cabc4..94607d6 100644 --- a/Storage/Storage/Public/LCFile.cs +++ b/Storage/Storage/Public/LCFile.cs @@ -7,9 +7,15 @@ using LeanCloud.Storage.Internal.File; using LeanCloud.Storage.Internal.Object; namespace LeanCloud.Storage { + /// + /// LCFile is a local representation of a file that is saved to LeanCloud. + /// public class LCFile : LCObject { public const string CLASS_NAME = "_File"; + /// + /// Gets the name of the file. + /// public string Name { get { return this["name"] as string; @@ -18,6 +24,9 @@ namespace LeanCloud.Storage { } } + /// + /// Gets the MIME type of the file. + /// public string MimeType { get { return this["mime_type"] as string; @@ -26,6 +35,9 @@ namespace LeanCloud.Storage { } } + /// + /// Gets the url of the file. + /// public string Url { get { return this["url"] as string; @@ -34,6 +46,9 @@ namespace LeanCloud.Storage { } } + /// + /// Gets the metadata of the file. + /// public Dictionary MetaData { get { return this["metaData"] as Dictionary; @@ -44,30 +59,58 @@ namespace LeanCloud.Storage { readonly Stream stream; + /// + /// Creates a new file. + /// public LCFile() : base(CLASS_NAME) { MetaData = new Dictionary(); } + /// + /// Creates a new file from a byte array and a name. + /// + /// + /// public LCFile(string name, byte[] bytes) : this() { Name = name; stream = new MemoryStream(bytes); } + /// + /// Creates a new file from a local file and a name. + /// + /// + /// public LCFile(string name, string path) : this() { Name = name; MimeType = LCMimeTypeMap.GetMimeType(path); stream = new FileStream(path, FileMode.Open); } + /// + /// Creates a new file from an url and a name. + /// + /// + /// public LCFile(string name, Uri url) : this() { Name = name; Url = url.AbsoluteUri; } + /// + /// Add metadata. + /// + /// + /// public void AddMetaData(string key, object value) { MetaData[key] = value; } + /// + /// Saves the file to LeanCloud. + /// + /// + /// public async Task Save(Action onProgress = null) { if (!string.IsNullOrEmpty(Url)) { // 外链方式 @@ -108,6 +151,10 @@ namespace LeanCloud.Storage { return this; } + /// + /// Deletes the file from LeanCloud. + /// + /// public new async Task Delete() { if (string.IsNullOrEmpty(ObjectId)) { return; @@ -116,6 +163,15 @@ namespace LeanCloud.Storage { await LCCore.HttpClient.Delete(path); } + /// + /// Gets the thumbnail url of image file. + /// + /// + /// + /// + /// + /// + /// public string GetThumbnailUrl(int width, int height, int quality = 100, bool scaleToFit = true, string format = "png") { int mode = scaleToFit ? 2 : 1; return $"{Url}?imageView/{mode}/w/{width}/h/{height}/q/{quality}/format/{format}"; @@ -132,6 +188,10 @@ namespace LeanCloud.Storage { return await LCCore.HttpClient.Post>("fileTokens", data: data); } + /// + /// Gets LCQuery of LCFile. + /// + /// public static LCQuery GetQuery() { return new LCQuery(CLASS_NAME); } diff --git a/Storage/Storage/Public/LCFollowersAndFollowees.cs b/Storage/Storage/Public/LCFollowersAndFollowees.cs index 3677490..33885a3 100644 --- a/Storage/Storage/Public/LCFollowersAndFollowees.cs +++ b/Storage/Storage/Public/LCFollowersAndFollowees.cs @@ -1,19 +1,34 @@ using System.Collections.Generic; namespace LeanCloud.Storage { + /// + /// LCFollowersAndFollowees is a result that contains followers and followees. + /// public class LCFollowersAndFollowees { + /// + /// The followers. + /// public List Followers { get; internal set; } + /// + /// The followees. + /// public List Followees { get; internal set; } + /// + /// The count of followers. + /// public int FollowersCount { get; internal set; } + /// + /// The count of followees. + /// public int FolloweesCount { get; internal set; } diff --git a/Storage/Storage/Public/LCFriendship.cs b/Storage/Storage/Public/LCFriendship.cs index d128d84..191a701 100644 --- a/Storage/Storage/Public/LCFriendship.cs +++ b/Storage/Storage/Public/LCFriendship.cs @@ -5,7 +5,16 @@ using LeanCloud.Common; using LeanCloud.Storage.Internal.Codec; namespace LeanCloud.Storage { + /// + /// LCFriendship contains static functions that handle the friendship of LeanCloud. + /// public static class LCFriendship { + /// + /// Requests to add friend. + /// + /// The user id to add. + /// The additional attributes for the friendship. + /// public static async Task Request(string userId, Dictionary attributes = null) { LCUser user = await LCUser.GetCurrent(); if (user == null) { @@ -23,6 +32,12 @@ namespace LeanCloud.Storage { await LCCore.HttpClient.Post>(path, data: data); } + /// + /// Accepts the request of add friend. + /// + /// The request. + /// The additional attributes for the friendship. + /// public static async Task AcceptRequest(LCFriendshipRequest request, Dictionary attributes = null) { if (request == null) { throw new ArgumentNullException(nameof(request)); @@ -37,6 +52,11 @@ namespace LeanCloud.Storage { await LCCore.HttpClient.Put>(path, data: data); } + /// + /// Declines the request of add friend. + /// + /// The request. + /// public static async Task DeclineRequest(LCFriendshipRequest request) { if (request == null) { throw new ArgumentNullException(nameof(request)); diff --git a/Storage/Storage/Public/LCFriendshipRequest.cs b/Storage/Storage/Public/LCFriendshipRequest.cs index 6306a62..0dddfc3 100644 --- a/Storage/Storage/Public/LCFriendshipRequest.cs +++ b/Storage/Storage/Public/LCFriendshipRequest.cs @@ -1,4 +1,8 @@ namespace LeanCloud.Storage { + /// + /// LCFriendshipRequest is a local representation of a friend request that + /// is saved to LeanCloud. + /// public class LCFriendshipRequest : LCObject { public const string CLASS_NAME = "_FriendshipRequest"; diff --git a/Storage/Storage/Public/LCGeoPoint.cs b/Storage/Storage/Public/LCGeoPoint.cs index 1cb3f44..58ca7a9 100644 --- a/Storage/Storage/Public/LCGeoPoint.cs +++ b/Storage/Storage/Public/LCGeoPoint.cs @@ -1,26 +1,49 @@ using System; namespace LeanCloud.Storage { + /// + /// LCGeoPoint represents a latitude and longitude point that may be associated + /// with a key in a LCObject or used as a reference point for queries. + /// public class LCGeoPoint { + /// + /// Gets the latitude of the LCGeoPoint. + /// public double Latitude { get; } + /// + /// Gets the longitude of the LCGeoPoint. + /// public double Longitude { get; } + /// + /// Constructs a LCGeoPoint with the specified latitude and longitude. + /// + /// + /// public LCGeoPoint(double latitude, double longtitude) { Latitude = latitude; Longitude = longtitude; } + /// + /// The original LCGeoPoint. + /// public static LCGeoPoint Origin { get { return new LCGeoPoint(0, 0); } } + /// + /// Calculate the distance in kilometer between this point and another GeoPoint. + /// + /// + /// public double KilometersTo(LCGeoPoint point) { if (point == null) { throw new ArgumentNullException(nameof(point)); @@ -28,6 +51,11 @@ namespace LeanCloud.Storage { return RadiansTo(point) * 6371.0; } + /// + /// Calculate the distance in mile between this point and another GeoPoint. + /// + /// + /// public double MilesTo(LCGeoPoint point) { if (point == null) { throw new ArgumentNullException(nameof(point)); @@ -35,6 +63,11 @@ namespace LeanCloud.Storage { return RadiansTo(point) * 3958.8; } + /// + /// Calculate the distance in radians between this point and another GeoPoint. + /// + /// + /// public double RadiansTo(LCGeoPoint point) { if (point == null) { throw new ArgumentNullException(nameof(point)); diff --git a/Storage/Storage/Public/LCHookObject.cs b/Storage/Storage/Public/LCHookObject.cs index afb8568..62b0f2a 100644 --- a/Storage/Storage/Public/LCHookObject.cs +++ b/Storage/Storage/Public/LCHookObject.cs @@ -5,6 +5,9 @@ using System.Linq; using LeanCloud.Storage.Internal.Operation; namespace LeanCloud.Storage { + /// + /// LCClassHook represents the hooks for saving / updating / deleting LCObject. + /// public static class LCClassHook { public const string BeforeSave = "beforeSave"; public const string AfterSave = "afterSave"; @@ -17,6 +20,9 @@ namespace LeanCloud.Storage { public partial class LCObject { internal const string IgnoreHooksKey = "__ignore_hooks"; + /// + /// Disable to hook before saving / updating / deleting LCObject. + /// public void DisableBeforeHook() { Ignore( LCClassHook.BeforeSave, @@ -24,6 +30,9 @@ namespace LeanCloud.Storage { LCClassHook.BeforeDelete); } + /// + /// Disable to hook after saving / updating / deleting LCObject. + /// public void DisableAfterHook() { Ignore( LCClassHook.AfterSave, @@ -31,6 +40,10 @@ namespace LeanCloud.Storage { LCClassHook.AfterDelete); } + /// + /// Ignores the hook for this LCObject. + /// + /// public void IgnoreHook(string hookName) { if (hookName != LCClassHook.BeforeSave && hookName != LCClassHook.AfterSave && hookName != LCClassHook.BeforeUpdate && hookName != LCClassHook.AfterUpdate && @@ -46,6 +59,10 @@ namespace LeanCloud.Storage { ApplyOperation(IgnoreHooksKey, op); } + /// + /// Gets the updated keys of this LCObject. + /// + /// public ReadOnlyCollection GetUpdatedKeys() { if (this["_updatedKeys"] == null) { return null; diff --git a/Storage/Storage/Public/LCObject.cs b/Storage/Storage/Public/LCObject.cs index 0b2398c..8aa072e 100644 --- a/Storage/Storage/Public/LCObject.cs +++ b/Storage/Storage/Public/LCObject.cs @@ -11,51 +11,60 @@ using LeanCloud.Storage.Internal.Codec; namespace LeanCloud.Storage { /// - /// LeanCloud Object + /// The LCObject is a local representation of data that can be saved and + /// retrieved from the LeanCloud. /// public partial class LCObject { - /// - /// Last synced data. - /// internal LCObjectData data; - /// - /// Estimated data. - /// internal Dictionary estimatedData; - /// - /// Operations. - /// internal Dictionary operationDict; static readonly Dictionary subclassTypeDict = new Dictionary(); static readonly Dictionary subclassNameDict = new Dictionary(); + /// + /// Gets the class name for the LCObject. + /// public string ClassName { get { return data.ClassName; } } + /// + /// Gets the object id. An object id is assigned as son as an object is + /// saved to the server. The combination of a and + /// an uniquely identifies an object in your application. + /// public string ObjectId { get { return data.ObjectId; } } + /// + /// Gets the first time of this object was saved the server. + /// public DateTime CreatedAt { get { return data.CreatedAt; } } + /// + /// Gets the last time of this object was updated the server. + /// public DateTime UpdatedAt { get { return data.UpdatedAt; } } + /// + /// Gets or sets the LCACL governing this object. + /// public LCACL ACL { get { return this["ACL"] as LCACL ; @@ -72,6 +81,12 @@ namespace LeanCloud.Storage { } } + /// + /// Constructs a new LCObject with no data in it. A LCObject constructed + /// in this way will not have an ObjectedId and will not persist to database + /// until is called. + /// + /// The className for the LCObject. public LCObject(string className) { if (string.IsNullOrEmpty(className)) { throw new ArgumentNullException(nameof(className)); @@ -84,6 +99,13 @@ namespace LeanCloud.Storage { isNew = true; } + /// + /// Creates a reference to an existing LCObject for use in creating + /// associations between LCObjects. + /// + /// The className for the LCObject. + /// The object id for the LCObject. + /// public static LCObject CreateWithoutData(string className, string objectId) { if (string.IsNullOrEmpty(objectId)) { throw new ArgumentNullException(nameof(objectId)); @@ -94,6 +116,12 @@ namespace LeanCloud.Storage { return obj; } + /// + /// Creates a reference to an existing LCObject for use in creating + /// associations between LCObjects. + /// + /// The className for the LCObject. + /// public static LCObject Create(string className) { if (subclassNameDict.TryGetValue(className, out LCSubclassInfo subclassInfo)) { return subclassInfo.Constructor.Invoke(); @@ -108,6 +136,12 @@ namespace LeanCloud.Storage { return null; } + /// + /// Gets or sets a value on the object. It is forbidden to name keys + /// with '_'. + /// + /// The value for key. + /// public object this[string key] { get { if (estimatedData.TryGetValue(key, out object value)) { @@ -148,6 +182,11 @@ namespace LeanCloud.Storage { } + /// + /// Creates a value for a key. + /// + /// + /// public void AddRelation(string key, LCObject value) { if (string.IsNullOrEmpty(key)) { throw new ArgumentNullException(nameof(key)); @@ -159,6 +198,11 @@ namespace LeanCloud.Storage { ApplyOperation(key, op); } + /// + /// Removes a value for a key. + /// + /// + /// public void RemoveRelation(string key, LCObject value) { if (string.IsNullOrEmpty(key)) { throw new ArgumentNullException(nameof(key)); @@ -324,6 +368,12 @@ namespace LeanCloud.Storage { } } + /// + /// Saves this object to the server. + /// + /// Whether or not fetch data when saved. + /// The condition for saving. + /// public async Task Save(bool fetchWhenSave = false, LCQuery query = null) { if (LCBatch.HasCircleReference(this, new HashSet())) { throw new ArgumentException("Found a circle dependency when save."); @@ -350,6 +400,11 @@ namespace LeanCloud.Storage { return this; } + /// + /// Saves each object in the provided list. + /// + /// The objects to save. + /// public static async Task> SaveAll(IEnumerable objects) { if (objects == null) { throw new ArgumentNullException(nameof(objects)); @@ -364,6 +419,10 @@ namespace LeanCloud.Storage { return objects.ToList(); } + /// + /// Deletes this object on the server. + /// + /// public async Task Delete() { if (ObjectId == null) { return; @@ -372,6 +431,11 @@ namespace LeanCloud.Storage { await LCCore.HttpClient.Delete(path); } + /// + /// Deletes each object in the provided list. + /// + /// + /// public static async Task DeleteAll(IEnumerable objects) { if (objects == null || objects.Count() == 0) { throw new ArgumentNullException(nameof(objects)); @@ -390,6 +454,12 @@ namespace LeanCloud.Storage { await LCCore.HttpClient.Post>("batch", data: data); } + /// + /// Fetches this object from server. + /// + /// The keys for fetching. + /// The include keys for fetching. + /// public async Task Fetch(IEnumerable keys = null, IEnumerable includes = null) { Dictionary queryParams = new Dictionary(); if (keys != null) { @@ -405,6 +475,11 @@ namespace LeanCloud.Storage { return this; } + /// + /// Fetches all of the objects in the provided list. + /// + /// The objects for fetching. + /// public static async Task> FetchAll(IEnumerable objects) { if (objects == null || objects.Count() == 0) { throw new ArgumentNullException(nameof(objects)); @@ -442,6 +517,13 @@ namespace LeanCloud.Storage { return objects; } + /// + /// Registers a custom subclass type with LeanCloud SDK, enabling strong-typing + /// of those LCObjects whenever they appear. + /// + /// The LCObject subclass type to register. + /// The className on server. + /// The constructor for creating an object. public static void RegisterSubclass(string className, Func constructor) where T : LCObject { Type classType = typeof(T); LCSubclassInfo subclassInfo = new LCSubclassInfo(className, classType, constructor); diff --git a/Storage/Storage/Public/LCQuery.cs b/Storage/Storage/Public/LCQuery.cs index 5e37364..2cacc61 100644 --- a/Storage/Storage/Public/LCQuery.cs +++ b/Storage/Storage/Public/LCQuery.cs @@ -9,7 +9,13 @@ using LeanCloud.Storage.Internal.Query; using LeanCloud.Storage.Internal.Object; namespace LeanCloud.Storage { + /// + /// The LCQuery class defines a query that is used to fetch LCObjects. + /// public class LCQuery { + /// + /// The classname of this query. + /// public string ClassName { get; internal set; } @@ -18,6 +24,10 @@ namespace LeanCloud.Storage { get; internal set; } + /// + /// Constructs a LCQuery for class. + /// + /// public LCQuery(string className) { ClassName = className; Condition = new LCCompositionalCondition(); @@ -172,16 +182,35 @@ namespace LeanCloud.Storage { return this; } + /// + /// The value corresponding to key is near the point. + /// + /// + /// + /// public LCQuery WhereNear(string key, LCGeoPoint point) { Condition.WhereNear(key, point); return this; } + /// + /// The value corresponding to key is in the given rectangular geographic bounding box. + /// + /// + /// + /// + /// public LCQuery WhereWithinGeoBox(string key, LCGeoPoint southwest, LCGeoPoint northeast) { Condition.WhereWithinGeoBox(key, southwest, northeast); return this; } + /// + /// The value corresponding to key is related to the parent. + /// + /// + /// + /// public LCQuery WhereRelatedTo(LCObject parent, string key) { Condition.WhereRelatedTo(parent, key); return this; @@ -255,13 +284,21 @@ namespace LeanCloud.Storage { return this; } - + /// + /// Sorts the results in ascending order by the given key. + /// + /// + /// public LCQuery OrderByAscending(string key) { Condition.OrderByAscending(key); return this; } - + /// + /// Sorts the results in descending order by the given key. + /// + /// + /// public LCQuery OrderByDescending(string key) { Condition.OrderByDescending(key); return this; @@ -338,6 +375,10 @@ namespace LeanCloud.Storage { return this; } + /// + /// Counts the number of objects that match this query. + /// + /// public async Task Count() { string path = $"classes/{ClassName}"; Dictionary parameters = BuildParams(); @@ -347,6 +388,12 @@ namespace LeanCloud.Storage { return (int)ret["count"]; } + /// + /// Constructs a LCObject whose id is already known by fetching data + /// from the server. + /// + /// + /// public async Task Get(string objectId) { if (string.IsNullOrEmpty(objectId)) { throw new ArgumentNullException(nameof(objectId)); @@ -363,6 +410,10 @@ namespace LeanCloud.Storage { return DecodeLCObject(response); } + /// + /// Retrieves a list of LCObjects that satisfy the query from Server. + /// + /// public async Task> Find() { string path = $"classes/{ClassName}"; Dictionary parameters = BuildParams(); @@ -376,6 +427,10 @@ namespace LeanCloud.Storage { return list.AsReadOnly(); } + /// + /// Retrieves at most one LCObject that satisfies this query. + /// + /// public async Task First() { Limit(1); ReadOnlyCollection results = await Find(); @@ -385,6 +440,11 @@ namespace LeanCloud.Storage { return null; } + /// + /// Constructs a query that is the and of the given queries. + /// + /// + /// public static LCQuery And(IEnumerable> queries) { if (queries == null || queries.Count() < 1) { throw new ArgumentNullException(nameof(queries)); @@ -402,6 +462,11 @@ namespace LeanCloud.Storage { return compositionQuery; } + /// + /// Constructs a query that is the or of the given queries. + /// + /// + /// public static LCQuery Or(IEnumerable> queries) { if (queries == null || queries.Count() < 1) { throw new ArgumentNullException(nameof(queries)); diff --git a/Storage/Storage/Public/LCRelation.cs b/Storage/Storage/Public/LCRelation.cs index bc989ef..cfeb47a 100644 --- a/Storage/Storage/Public/LCRelation.cs +++ b/Storage/Storage/Public/LCRelation.cs @@ -1,21 +1,40 @@ namespace LeanCloud.Storage { - + /// + /// LCRelation provides access to all of the children of a many-to-many + /// relationship. + /// + /// The type of the child objects. public class LCRelation where T : LCObject { + /// + /// The key of this LCRelation. + /// public string Key { get; set; } + /// + /// The parent of this LCRelation. + /// public LCObject Parent { get; set; } + /// + /// The className of this LCRelation. + /// public string TargetClass { get; set; } + /// + /// Constructs a LCRelation. + /// public LCRelation() { } + /// + /// Gets a query that can be used to query the objects in this relation. + /// public LCQuery Query { get { LCQuery query = new LCQuery(TargetClass); diff --git a/Storage/Storage/Public/LCRole.cs b/Storage/Storage/Public/LCRole.cs index 49d949c..d3e6ce8 100644 --- a/Storage/Storage/Public/LCRole.cs +++ b/Storage/Storage/Public/LCRole.cs @@ -5,7 +5,9 @@ public class LCRole : LCObject { public const string CLASS_NAME = "_Role"; - + /// + /// The name of LCRole. + /// public string Name { get { return this["name"] as string; @@ -40,9 +42,18 @@ } } + /// + /// Constructs a LCRole. + /// public LCRole() : base(CLASS_NAME) { } + /// + /// Constructs a LCRole with a name and a LCACL. + /// + /// + /// + /// public static LCRole Create(string name, LCACL acl) { LCRole role = new LCRole() { Name = name, diff --git a/Storage/Storage/Public/LCSMSClient.cs b/Storage/Storage/Public/LCSMSClient.cs index 8f6e9ca..aa85503 100644 --- a/Storage/Storage/Public/LCSMSClient.cs +++ b/Storage/Storage/Public/LCSMSClient.cs @@ -61,6 +61,12 @@ namespace LeanCloud.Storage { await LCCore.HttpClient.Post>(path, data: data); } + /// + /// Verifies the mobile number with the verification code. + /// + /// + /// + /// public static async Task VerifyMobilePhone(string mobile, string code) { string path = $"verifySmsCode/{code}"; Dictionary data = new Dictionary { diff --git a/Storage/Storage/Public/LCStatus.cs b/Storage/Storage/Public/LCStatus.cs index 12f166c..e2f5942 100644 --- a/Storage/Storage/Public/LCStatus.cs +++ b/Storage/Storage/Public/LCStatus.cs @@ -7,6 +7,9 @@ using LeanCloud.Storage.Internal.Object; using LC.Newtonsoft.Json; namespace LeanCloud.Storage { + /// + /// LCStatus is a local representation of a status in LeanCloud. + /// public class LCStatus : LCObject { public const string CLASS_NAME = "_Status"; @@ -22,25 +25,42 @@ namespace LeanCloud.Storage { public const string OwnerKey = "owner"; public const string MessageIdKey = "messageId"; + /// + /// The id of this status. + /// public int MessageId { get; internal set; } + /// + /// The inboxType of this status. + /// public string InboxType { get; internal set; } private LCQuery query; + /// + /// The data of this status. + /// public Dictionary Data { get; set; } + /// + /// Constructs a LCStatus. + /// public LCStatus() : base(CLASS_NAME) { InboxType = InboxTypeDefault; Data = new Dictionary(); } + /// + /// Sends the status to the followers of this user. + /// + /// + /// public static async Task SendToFollowers(LCStatus status) { if (status == null) { throw new ArgumentNullException(nameof(status)); @@ -62,6 +82,12 @@ namespace LeanCloud.Storage { return await status.Send(); } + /// + /// Sends the status to the user with targetId privatedly. + /// + /// + /// + /// public static async Task SendPrivately(LCStatus status, string targetId) { if (status == null) { throw new ArgumentNullException(nameof(status)); @@ -84,6 +110,10 @@ namespace LeanCloud.Storage { return await status.Send(); } + /// + /// Send this status. + /// + /// public async Task Send() { LCUser user = await LCUser.GetCurrent(); if (user == null) { @@ -118,6 +148,10 @@ namespace LeanCloud.Storage { return this; } + /// + /// Deletes this status. + /// + /// public new async Task Delete() { LCUser user = await LCUser.GetCurrent(); if (user == null) { @@ -137,6 +171,11 @@ namespace LeanCloud.Storage { } } + /// + /// Gets the count of the status with inboxType. + /// + /// + /// public static async Task GetCount(string inboxType) { LCUser user = await LCUser.GetCurrent(); if (user == null) { @@ -158,6 +197,11 @@ namespace LeanCloud.Storage { return statusCount; } + /// + /// Reset the count of the status to be zero. + /// + /// + /// public static async Task ResetUnreadCount(string inboxType = null) { LCUser user = await LCUser.GetCurrent(); if (user == null) { diff --git a/Storage/Storage/Public/LCStatusCount.cs b/Storage/Storage/Public/LCStatusCount.cs index 56ce6b4..763ada3 100644 --- a/Storage/Storage/Public/LCStatusCount.cs +++ b/Storage/Storage/Public/LCStatusCount.cs @@ -1,9 +1,18 @@ namespace LeanCloud.Storage { + /// + /// LCStatusCount is a result that contains the count of status. + /// public class LCStatusCount { + /// + /// The total count. + /// public int Total { get; set; } + /// + /// The unread count. + /// public int Unread { get; set; } diff --git a/Storage/Storage/Public/LCStatusQuery.cs b/Storage/Storage/Public/LCStatusQuery.cs index b3de9c5..510212d 100644 --- a/Storage/Storage/Public/LCStatusQuery.cs +++ b/Storage/Storage/Public/LCStatusQuery.cs @@ -9,25 +9,45 @@ using LeanCloud.Storage.Internal.Codec; using LeanCloud.Storage.Internal.Object; namespace LeanCloud.Storage { + /// + /// LCStatusQuery is the query of LCStatus. + /// public class LCStatusQuery : LCQuery { + /// + /// The inboxType for query. + /// public string InboxType { get; set; } + /// + /// The id since the query. + /// public int SinceId { get; set; } + /// + /// The max id for the query. + /// public int MaxId { get; set; } + /// + /// Constructs a LCStatusQuery with inboxType. + /// + /// public LCStatusQuery(string inboxType = LCStatus.InboxTypeDefault) : base("_Status") { InboxType = inboxType; SinceId = 0; MaxId = 0; } + /// + /// Retrieves a list of LCStatus that satisfy the query from Server. + /// + /// public new async Task> Find() { LCUser user = await LCUser.GetCurrent(); if (user == null) { diff --git a/Storage/Storage/Public/LCStorage.cs b/Storage/Storage/Public/LCStorage.cs index 9b5635d..0ba1102 100644 --- a/Storage/Storage/Public/LCStorage.cs +++ b/Storage/Storage/Public/LCStorage.cs @@ -1,5 +1,4 @@ -using System; -using LeanCloud.Common; +using LeanCloud.Common; namespace LeanCloud.Storage { public class LCStorage { diff --git a/Storage/Storage/Public/LCUser.cs b/Storage/Storage/Public/LCUser.cs index cf03635..09ff403 100644 --- a/Storage/Storage/Public/LCUser.cs +++ b/Storage/Storage/Public/LCUser.cs @@ -6,6 +6,9 @@ using LeanCloud.Common; using LeanCloud.Storage.Internal.Object; namespace LeanCloud.Storage { + /// + /// LCUser represents a user for a LeanCloud application. + /// public class LCUser : LCObject { public const string CLASS_NAME = "_User"; @@ -79,6 +82,11 @@ namespace LeanCloud.Storage { static LCUser currentUser; + /// + /// Gets the currently logged in LCUser with a valid session, either from + /// memory or disk if necessary. + /// + /// public static async Task GetCurrent() { if (currentUser != null) { return currentUser; @@ -700,6 +708,13 @@ namespace LeanCloud.Storage { .Include("followee"); } + /// + /// Gets the followers and followees of the currently logged in user. + /// + /// + /// + /// + /// public async Task GetFollowersAndFollowees(bool includeFollower = false, bool includeFollowee = false, bool returnCount = false) { Dictionary queryParams = new Dictionary(); From 52044b9071ae6fa6a7d23cb34fb879475265badb Mon Sep 17 00:00:00 2001 From: oneRain Date: Mon, 19 Apr 2021 17:11:26 +0800 Subject: [PATCH 02/71] doc: leaderboard --- .../Public/Leaderboard/LCLeaderboard.cs | 102 ++++++++++++++++-- .../Storage/Public/Leaderboard/LCRanking.cs | 15 +++ .../Storage/Public/Leaderboard/LCStatistic.cs | 12 +++ 3 files changed, 122 insertions(+), 7 deletions(-) diff --git a/Storage/Storage/Public/Leaderboard/LCLeaderboard.cs b/Storage/Storage/Public/Leaderboard/LCLeaderboard.cs index 9cab449..0730081 100644 --- a/Storage/Storage/Public/Leaderboard/LCLeaderboard.cs +++ b/Storage/Storage/Public/Leaderboard/LCLeaderboard.cs @@ -26,35 +26,68 @@ namespace LeanCloud.Storage { Month } + /// + /// LCLeaderboard represents LeanCloud leaderboard and contains static functions + /// that handle the statistic. + /// public class LCLeaderboard { + /// + /// The name of statistic. + /// public string StatisticName { get; private set; } + /// + /// The order of this leaderboard. + /// public LCLeaderboardOrder Order { get; private set; } + /// + /// The update strategy of this leaderboard. + /// public LCLeaderboardUpdateStrategy UpdateStrategy { get; private set; } + /// + /// The interval of the version that the leaderboard resets. + /// public LCLeaderboardVersionChangeInterval VersionChangeInterval { get; private set; } + /// + /// The version of this leaderboard. + /// public int Version { get; private set; } + /// + /// The next time that the leaderboard resets. + /// public DateTime NextResetAt { get; private set; } + /// + /// The time that the leaderboard created. + /// public DateTime CreatedAt { get; private set; } + /// + /// Creates a LCLeaderboard with a statistic name. + /// + /// + /// + /// + /// + /// public static async Task CreateLeaderboard(string statisticName, LCLeaderboardOrder order = LCLeaderboardOrder.Descending, LCLeaderboardUpdateStrategy updateStrategy = LCLeaderboardUpdateStrategy.Better, @@ -90,12 +123,23 @@ namespace LeanCloud.Storage { }; } + /// + /// Gets the LCLeaderboard with the given name. + /// + /// + /// public static Task GetLeaderboard(string statisticName) { LCLeaderboard leaderboard = CreateWithoutData(statisticName); return leaderboard.Fetch(); } - + /// + /// Updates the statistic of the user. + /// + /// + /// + /// + /// public static async Task> UpdateStatistics(LCUser user, Dictionary statistics, bool overwrite = false) { @@ -127,7 +171,12 @@ namespace LeanCloud.Storage { return null; } - + /// + /// Gets the statistics of the user. + /// + /// + /// + /// public static async Task> GetStatistics(LCUser user, IEnumerable statisticNames = null) { if (user == null) { @@ -151,7 +200,12 @@ namespace LeanCloud.Storage { return null; } - + /// + /// Deletes the statistics of the user with the given name. + /// + /// + /// + /// public static async Task DeleteStatistics(LCUser user, IEnumerable statisticNames) { if (user == null) { @@ -195,7 +249,15 @@ namespace LeanCloud.Storage { return null; } - + /// + /// Gets the rankings. + /// + /// + /// + /// + /// + /// + /// public Task> GetResults(int version = -1, int skip = 0, int limit = 10, @@ -204,7 +266,15 @@ namespace LeanCloud.Storage { return GetResults(null, version, skip, limit, selectUserKeys, includeStatistics); } - + /// + /// Get the rankings that around the currently logged in user. + /// + /// + /// + /// + /// + /// + /// public async Task> GetResultsAroundUser(int version = -1, int skip = 0, int limit = 10, @@ -214,6 +284,16 @@ namespace LeanCloud.Storage { return await GetResults(user, version, skip, limit, selectUserKeys, includeStatistics); } + /// + /// Gets the rankings of the user. + /// + /// + /// + /// + /// + /// + /// + /// private async Task> GetResults(LCUser user, int version, int skip, @@ -249,7 +329,11 @@ namespace LeanCloud.Storage { return null; } - + /// + /// Updates the update strategy of this LCLeaderboard. + /// + /// + /// public async Task UpdateUpdateStrategy(LCLeaderboardUpdateStrategy updateStrategy) { Dictionary data = new Dictionary { { "updateStrategy", updateStrategy.ToString().ToLower() } @@ -264,7 +348,11 @@ namespace LeanCloud.Storage { return this; } - + /// + /// Updates the interval of the version that this LCLeaderboard changes. + /// + /// + /// public async Task UpdateVersionChangeInterval(LCLeaderboardVersionChangeInterval versionChangeInterval) { Dictionary data = new Dictionary { { "versionChangeInterval", versionChangeInterval.ToString().ToLower() } diff --git a/Storage/Storage/Public/Leaderboard/LCRanking.cs b/Storage/Storage/Public/Leaderboard/LCRanking.cs index ea3ca9c..1474e2c 100644 --- a/Storage/Storage/Public/Leaderboard/LCRanking.cs +++ b/Storage/Storage/Public/Leaderboard/LCRanking.cs @@ -4,19 +4,34 @@ using System.Collections.ObjectModel; using LeanCloud.Storage.Internal.Object; namespace LeanCloud.Storage { + /// + /// LCRanking represents the rankings of LCLeaderboard. + /// public class LCRanking { + /// + /// The ranking. + /// public int Rank { get; private set; } + /// + /// The user of this LCRanking. + /// public LCUser User { get; private set; } + /// + /// The statistic name of this LCRanking. + /// public string StatisticName { get; private set; } + /// + /// The value of this LCRanking. + /// public double Value { get; private set; } diff --git a/Storage/Storage/Public/Leaderboard/LCStatistic.cs b/Storage/Storage/Public/Leaderboard/LCStatistic.cs index a9823a5..5f26624 100644 --- a/Storage/Storage/Public/Leaderboard/LCStatistic.cs +++ b/Storage/Storage/Public/Leaderboard/LCStatistic.cs @@ -2,15 +2,27 @@ using System.Collections.Generic; namespace LeanCloud.Storage { + /// + /// LCStatistic represents the statistic of LeanCloud leaderboard. + /// public class LCStatistic { + /// + /// The name of this LCStatistic. + /// public string Name { get; private set; } + /// + /// The value of this LCStatistic. + /// public double Value { get; private set; } + /// + /// The version of this LCStatistic. + /// public int Version { get; internal set; } From 28e6890e94b540b442d5c8199705b592e4cfda9e Mon Sep 17 00:00:00 2001 From: oneRain Date: Mon, 19 Apr 2021 17:11:41 +0800 Subject: [PATCH 03/71] test --- Storage/Storage.Test/LeaderboardTest.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Storage/Storage.Test/LeaderboardTest.cs b/Storage/Storage.Test/LeaderboardTest.cs index a294ac4..8d258a6 100644 --- a/Storage/Storage.Test/LeaderboardTest.cs +++ b/Storage/Storage.Test/LeaderboardTest.cs @@ -14,6 +14,7 @@ namespace Storage.Test { [SetUp] public void SetUp() { + LCLogger.LogDelegate += Utils.Print; LCApplication.Initialize(Utils.AppId, Utils.AppKey, Utils.AppServer, Utils.MasterKey); LCApplication.UseMasterKey = true; leaderboardName = $"Leaderboard_{DateTimeOffset.Now.DayOfYear}"; From 1cf76845979e686df7ee49c3073d3f987628d9c6 Mon Sep 17 00:00:00 2001 From: oneRain Date: Tue, 20 Apr 2021 11:12:47 +0800 Subject: [PATCH 04/71] doc: realtime --- .../Public/Conversation/LCIMChatRoom.cs | 17 ++++++++++++++++- .../Public/Conversation/LCIMConversation.cs | 3 ++- .../Conversation/LCIMConversationMemberInfo.cs | 3 +++ .../Conversation/LCIMConversationQuery.cs | 4 +++- .../Conversation/LCIMMessageQueryOptions.cs | 4 ++++ .../Conversation/LCIMServiceConversation.cs | 4 ++++ .../Conversation/LCIMTemporaryConversation.cs | 4 ++++ Realtime/Realtime/Public/LCIMClient.cs | 17 +++++++++++++++++ Realtime/Realtime/Public/LCRealtime.cs | 3 +++ .../Realtime/Public/Message/LCIMAudioMessage.cs | 3 +++ .../Public/Message/LCIMBinaryMessage.cs | 3 +++ .../Realtime/Public/Message/LCIMFileMessage.cs | 3 +++ .../Realtime/Public/Message/LCIMImageMessage.cs | 3 +++ .../Public/Message/LCIMLocationMessage.cs | 3 +++ .../Realtime/Public/Message/LCIMTextMessage.cs | 3 +++ .../Realtime/Public/Message/LCIMVideoMessage.cs | 3 +++ .../Public/Result/LCIMOperationFailure.cs | 3 +++ .../Realtime/Public/Result/LCIMPageResult.cs | 3 +++ .../Public/Result/LCIMPartiallySuccessResult.cs | 3 +++ .../Public/Signature/ILCIMSignatureFactory.cs | 3 +++ .../Realtime/Public/Signature/LCIMSignature.cs | 3 +++ 21 files changed, 92 insertions(+), 3 deletions(-) diff --git a/Realtime/Realtime/Public/Conversation/LCIMChatRoom.cs b/Realtime/Realtime/Public/Conversation/LCIMChatRoom.cs index 0ecccf1..6630bcd 100644 --- a/Realtime/Realtime/Public/Conversation/LCIMChatRoom.cs +++ b/Realtime/Realtime/Public/Conversation/LCIMChatRoom.cs @@ -5,7 +5,7 @@ using System.Threading.Tasks; namespace LeanCloud.Realtime { /// - /// Chatroom + /// LCIMChatRoom is a local representation of chatroom in LeanCloud. /// public class LCIMChatRoom : LCIMConversation { public LCIMChatRoom(LCIMClient client) : @@ -25,14 +25,29 @@ namespace LeanCloud.Realtime { return await Client.ConversationController.GetOnlineMembers(Id, limit); } + /// + /// Adds members to this conversation. + /// + /// + /// public override Task AddMembers(IEnumerable clientIds) { throw new Exception("Add members is not allowed in chat room."); } + /// + /// Flags the read status of this conversation. + /// But it's nothing to do in LCIMChatRoom. + /// + /// public override Task Read() { return Task.CompletedTask; } + /// + /// Fetchs the recipt timestamps of this conversation. + /// But it's nothing to do in LCIMChatRoom. + /// + /// public override Task FetchReciptTimestamps() { return Task.CompletedTask; } diff --git a/Realtime/Realtime/Public/Conversation/LCIMConversation.cs b/Realtime/Realtime/Public/Conversation/LCIMConversation.cs index ed6e75b..77cb321 100644 --- a/Realtime/Realtime/Public/Conversation/LCIMConversation.cs +++ b/Realtime/Realtime/Public/Conversation/LCIMConversation.cs @@ -6,7 +6,8 @@ using System.Collections.ObjectModel; namespace LeanCloud.Realtime { /// - /// Conversation + /// LCIMConversation is a local representation of general conversation + /// in LeanCloud. /// public class LCIMConversation { /// diff --git a/Realtime/Realtime/Public/Conversation/LCIMConversationMemberInfo.cs b/Realtime/Realtime/Public/Conversation/LCIMConversationMemberInfo.cs index 48e4324..b26253e 100644 --- a/Realtime/Realtime/Public/Conversation/LCIMConversationMemberInfo.cs +++ b/Realtime/Realtime/Public/Conversation/LCIMConversationMemberInfo.cs @@ -1,4 +1,7 @@ namespace LeanCloud.Realtime { + /// + /// LCIMConversationMemberInfo represents the member info of the conversation. + /// public class LCIMConversationMemberInfo { public const string Owner = "Owner"; diff --git a/Realtime/Realtime/Public/Conversation/LCIMConversationQuery.cs b/Realtime/Realtime/Public/Conversation/LCIMConversationQuery.cs index e65f193..a77099f 100644 --- a/Realtime/Realtime/Public/Conversation/LCIMConversationQuery.cs +++ b/Realtime/Realtime/Public/Conversation/LCIMConversationQuery.cs @@ -3,10 +3,12 @@ using System.Collections; using System.Collections.ObjectModel; using LeanCloud.Storage.Internal.Query; using System.Linq; -using System.Collections.Generic; using System; namespace LeanCloud.Realtime { + /// + /// LCIMConversationQuery is the query for conversation. + /// public class LCIMConversationQuery { internal const int CompactFlag = 0x1; internal const int WithLastMessageFlag = 0x2; diff --git a/Realtime/Realtime/Public/Conversation/LCIMMessageQueryOptions.cs b/Realtime/Realtime/Public/Conversation/LCIMMessageQueryOptions.cs index c936feb..5f1aae3 100644 --- a/Realtime/Realtime/Public/Conversation/LCIMMessageQueryOptions.cs +++ b/Realtime/Realtime/Public/Conversation/LCIMMessageQueryOptions.cs @@ -1,6 +1,10 @@ using System; namespace LeanCloud.Realtime { + /// + /// LCIMMessageQueryEndpoint is the parameter that controls the limitation + /// of querying messages. + /// public class LCIMMessageQueryEndpoint { public string MessageId { get; set; diff --git a/Realtime/Realtime/Public/Conversation/LCIMServiceConversation.cs b/Realtime/Realtime/Public/Conversation/LCIMServiceConversation.cs index d55a16f..68a0986 100644 --- a/Realtime/Realtime/Public/Conversation/LCIMServiceConversation.cs +++ b/Realtime/Realtime/Public/Conversation/LCIMServiceConversation.cs @@ -2,6 +2,10 @@ using System.Threading.Tasks; namespace LeanCloud.Realtime { + /// + /// LCIMServiceConversation is a local representation of service conversation + /// in LeanCloud. + /// public class LCIMServiceConversation : LCIMConversation { public LCIMServiceConversation(LCIMClient client) : base(client) { } diff --git a/Realtime/Realtime/Public/Conversation/LCIMTemporaryConversation.cs b/Realtime/Realtime/Public/Conversation/LCIMTemporaryConversation.cs index 3fc19c3..698a192 100644 --- a/Realtime/Realtime/Public/Conversation/LCIMTemporaryConversation.cs +++ b/Realtime/Realtime/Public/Conversation/LCIMTemporaryConversation.cs @@ -1,6 +1,10 @@ using System; namespace LeanCloud.Realtime { + /// + /// LCIMTemporaryConversation is a local representation of temporary conversation + /// in LeanCloud. + /// public class LCIMTemporaryConversation : LCIMConversation { public DateTime ExpiredAt { get; diff --git a/Realtime/Realtime/Public/LCIMClient.cs b/Realtime/Realtime/Public/LCIMClient.cs index 88cf67a..3f64bf4 100644 --- a/Realtime/Realtime/Public/LCIMClient.cs +++ b/Realtime/Realtime/Public/LCIMClient.cs @@ -29,6 +29,9 @@ namespace LeanCloud.Realtime { get; private set; } + /// + /// Device Id + /// public string DeviceId { get; private set; } @@ -235,6 +238,13 @@ namespace LeanCloud.Realtime { #region 接口 + /// + /// Constructs a LCIMClient with client id. + /// + /// + /// + /// + /// public LCIMClient(string clientId, string tag = null, string deviceId = null, @@ -245,6 +255,13 @@ namespace LeanCloud.Realtime { SetUpClient(clientId, tag, deviceId, signatureFactory); } + /// + /// Constructs a LCIMClient with a LCUser. + /// + /// + /// + /// + /// public LCIMClient(LCUser user, string tag = null, string deviceId = null, diff --git a/Realtime/Realtime/Public/LCRealtime.cs b/Realtime/Realtime/Public/LCRealtime.cs index 08d7c19..9b70960 100644 --- a/Realtime/Realtime/Public/LCRealtime.cs +++ b/Realtime/Realtime/Public/LCRealtime.cs @@ -2,6 +2,9 @@ using LeanCloud.Realtime.Internal.Connection; namespace LeanCloud.Realtime { + /// + /// LCRealtime contains static functions that handle the global connection. + /// public class LCRealtime { /// /// Every application uses a connection. diff --git a/Realtime/Realtime/Public/Message/LCIMAudioMessage.cs b/Realtime/Realtime/Public/Message/LCIMAudioMessage.cs index cf80bec..f7103a5 100644 --- a/Realtime/Realtime/Public/Message/LCIMAudioMessage.cs +++ b/Realtime/Realtime/Public/Message/LCIMAudioMessage.cs @@ -2,6 +2,9 @@ using LeanCloud.Storage; namespace LeanCloud.Realtime { + /// + /// LCIMAudioMessage is a local representation of audio message in LeanCloud. + /// public class LCIMAudioMessage : LCIMFileMessage { public double Duration { get; private set; diff --git a/Realtime/Realtime/Public/Message/LCIMBinaryMessage.cs b/Realtime/Realtime/Public/Message/LCIMBinaryMessage.cs index d0af326..f5d5aa2 100644 --- a/Realtime/Realtime/Public/Message/LCIMBinaryMessage.cs +++ b/Realtime/Realtime/Public/Message/LCIMBinaryMessage.cs @@ -1,4 +1,7 @@ namespace LeanCloud.Realtime { + /// + /// LCIMBinaryMessage is a local representation of binary message in LeanCloud. + /// public class LCIMBinaryMessage : LCIMMessage { public byte[] Data { get; internal set; diff --git a/Realtime/Realtime/Public/Message/LCIMFileMessage.cs b/Realtime/Realtime/Public/Message/LCIMFileMessage.cs index 1c8656c..d5fc485 100644 --- a/Realtime/Realtime/Public/Message/LCIMFileMessage.cs +++ b/Realtime/Realtime/Public/Message/LCIMFileMessage.cs @@ -5,6 +5,9 @@ using LeanCloud.Storage; using System.Threading.Tasks; namespace LeanCloud.Realtime { + /// + /// LCIMFileMessage is a local representation of file message in LeanCloud. + /// public class LCIMFileMessage : LCIMTextMessage { public LCFile File { get; set; diff --git a/Realtime/Realtime/Public/Message/LCIMImageMessage.cs b/Realtime/Realtime/Public/Message/LCIMImageMessage.cs index 07679ed..5fd2a97 100644 --- a/Realtime/Realtime/Public/Message/LCIMImageMessage.cs +++ b/Realtime/Realtime/Public/Message/LCIMImageMessage.cs @@ -2,6 +2,9 @@ using LeanCloud.Storage; namespace LeanCloud.Realtime { + /// + /// LCIMImageMessage is a local representation of image message in LeanCloud. + /// public class LCIMImageMessage : LCIMFileMessage { public int Width { get; private set; diff --git a/Realtime/Realtime/Public/Message/LCIMLocationMessage.cs b/Realtime/Realtime/Public/Message/LCIMLocationMessage.cs index 44fde3b..6ebf596 100644 --- a/Realtime/Realtime/Public/Message/LCIMLocationMessage.cs +++ b/Realtime/Realtime/Public/Message/LCIMLocationMessage.cs @@ -3,6 +3,9 @@ using System.Collections.Generic; using LeanCloud.Storage; namespace LeanCloud.Realtime { + /// + /// LCIMLocationMessage is a local representation of location message in LeanCloud. + /// public class LCIMLocationMessage : LCIMTextMessage { public LCGeoPoint Location { get; set; diff --git a/Realtime/Realtime/Public/Message/LCIMTextMessage.cs b/Realtime/Realtime/Public/Message/LCIMTextMessage.cs index e9cee7b..5c834fa 100644 --- a/Realtime/Realtime/Public/Message/LCIMTextMessage.cs +++ b/Realtime/Realtime/Public/Message/LCIMTextMessage.cs @@ -1,6 +1,9 @@ using System.Collections.Generic; namespace LeanCloud.Realtime { + /// + /// LCIMTextMessage is a local representation of text message in LeanCloud. + /// public class LCIMTextMessage : LCIMTypedMessage { public string Text { get; set; diff --git a/Realtime/Realtime/Public/Message/LCIMVideoMessage.cs b/Realtime/Realtime/Public/Message/LCIMVideoMessage.cs index c49ce9f..0fe119a 100644 --- a/Realtime/Realtime/Public/Message/LCIMVideoMessage.cs +++ b/Realtime/Realtime/Public/Message/LCIMVideoMessage.cs @@ -2,6 +2,9 @@ using LeanCloud.Storage; namespace LeanCloud.Realtime { + /// + /// LCIMVideoMessage is a local representation of video message in LeanCloud. + /// public class LCIMVideoMessage : LCIMFileMessage { public int Width { get; private set; diff --git a/Realtime/Realtime/Public/Result/LCIMOperationFailure.cs b/Realtime/Realtime/Public/Result/LCIMOperationFailure.cs index 1f95229..e282a12 100644 --- a/Realtime/Realtime/Public/Result/LCIMOperationFailure.cs +++ b/Realtime/Realtime/Public/Result/LCIMOperationFailure.cs @@ -1,6 +1,9 @@ using System.Collections.Generic; namespace LeanCloud.Realtime { + /// + /// LCIMOperationFailure is the result that handles the operation of conversation. + /// public class LCIMOperationFailure { public int Code { get; set; diff --git a/Realtime/Realtime/Public/Result/LCIMPageResult.cs b/Realtime/Realtime/Public/Result/LCIMPageResult.cs index a559db6..259dfb9 100644 --- a/Realtime/Realtime/Public/Result/LCIMPageResult.cs +++ b/Realtime/Realtime/Public/Result/LCIMPageResult.cs @@ -1,6 +1,9 @@ using System.Collections.ObjectModel; namespace LeanCloud.Realtime { + /// + /// LCIMPageResult represents the results of query. + /// public class LCIMPageResult { public ReadOnlyCollection Results { get; internal set; diff --git a/Realtime/Realtime/Public/Result/LCIMPartiallySuccessResult.cs b/Realtime/Realtime/Public/Result/LCIMPartiallySuccessResult.cs index 86f61e5..92e008a 100644 --- a/Realtime/Realtime/Public/Result/LCIMPartiallySuccessResult.cs +++ b/Realtime/Realtime/Public/Result/LCIMPartiallySuccessResult.cs @@ -1,6 +1,9 @@ using System.Collections.Generic; namespace LeanCloud.Realtime { + /// + /// LCIMPartiallySuccessResult is the result that handles the operation of conversation. + /// public class LCIMPartiallySuccessResult { public List SuccessfulClientIdList { get; internal set; diff --git a/Realtime/Realtime/Public/Signature/ILCIMSignatureFactory.cs b/Realtime/Realtime/Public/Signature/ILCIMSignatureFactory.cs index 47efa91..7cd9fc6 100644 --- a/Realtime/Realtime/Public/Signature/ILCIMSignatureFactory.cs +++ b/Realtime/Realtime/Public/Signature/ILCIMSignatureFactory.cs @@ -2,6 +2,9 @@ using System.Threading.Tasks; namespace LeanCloud.Realtime { + /// + /// + /// public interface ILCIMSignatureFactory { Task CreateConnectSignature(string clientId); diff --git a/Realtime/Realtime/Public/Signature/LCIMSignature.cs b/Realtime/Realtime/Public/Signature/LCIMSignature.cs index 416b86d..1207f52 100644 --- a/Realtime/Realtime/Public/Signature/LCIMSignature.cs +++ b/Realtime/Realtime/Public/Signature/LCIMSignature.cs @@ -1,4 +1,7 @@ namespace LeanCloud.Realtime { + /// + /// LCIMSignature represents a LCRealtime signature. + /// public class LCIMSignature { public string Signature { get; set; From 6c6c4176c6ee5e7ba930da3d62c55c53c7611729 Mon Sep 17 00:00:00 2001 From: oneRain Date: Tue, 20 Apr 2021 11:20:12 +0800 Subject: [PATCH 05/71] doc: LCIMClient --- Realtime/Realtime/Public/LCIMClient.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Realtime/Realtime/Public/LCIMClient.cs b/Realtime/Realtime/Public/LCIMClient.cs index 3f64bf4..0d33627 100644 --- a/Realtime/Realtime/Public/LCIMClient.cs +++ b/Realtime/Realtime/Public/LCIMClient.cs @@ -8,7 +8,9 @@ using LeanCloud.Realtime.Internal.Protocol; using LeanCloud.Realtime.Internal.Controller; namespace LeanCloud.Realtime { - + /// + /// LCIMClient is a local representation of realtime client in LeanCloud. + /// public class LCIMClient { /// /// Conversation cache From 5c9db0c0265046c8be6d59e6e1f106eb1ff74567 Mon Sep 17 00:00:00 2001 From: oneRain Date: Tue, 20 Apr 2021 11:20:45 +0800 Subject: [PATCH 06/71] chore: move LCStorage.cs --- Storage/Storage.AOT/Storage.AOT.csproj | 6 +++--- Storage/Storage.Standard/Public/LCApplication.cs | 2 +- Storage/Storage.Unity/Public/LCApplication.cs | 2 +- Storage/Storage/{Public => Internal}/LCStorage.cs | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) rename Storage/Storage/{Public => Internal}/LCStorage.cs (96%) diff --git a/Storage/Storage.AOT/Storage.AOT.csproj b/Storage/Storage.AOT/Storage.AOT.csproj index 88a3764..fc40119 100644 --- a/Storage/Storage.AOT/Storage.AOT.csproj +++ b/Storage/Storage.AOT/Storage.AOT.csproj @@ -56,9 +56,6 @@ Storage\Public\LCGeoPoint.cs - - Storage\Public\LCStorage.cs - Storage\Public\LCUserAuthDataLoginOption.cs @@ -155,5 +152,8 @@ Storage\Internal\Query\LCCompositionalCondition.cs + + Storage\Internal\LCStorage.cs + diff --git a/Storage/Storage.Standard/Public/LCApplication.cs b/Storage/Storage.Standard/Public/LCApplication.cs index bddc77c..885814b 100644 --- a/Storage/Storage.Standard/Public/LCApplication.cs +++ b/Storage/Storage.Standard/Public/LCApplication.cs @@ -1,5 +1,5 @@ using LeanCloud.Common; -using LeanCloud.Storage; +using LeanCloud.Storage.Internal; namespace LeanCloud { public class LCApplication { diff --git a/Storage/Storage.Unity/Public/LCApplication.cs b/Storage/Storage.Unity/Public/LCApplication.cs index aa76d2f..152a004 100644 --- a/Storage/Storage.Unity/Public/LCApplication.cs +++ b/Storage/Storage.Unity/Public/LCApplication.cs @@ -1,5 +1,5 @@ using LeanCloud.Common; -using LeanCloud.Storage; +using LeanCloud.Storage.Internal; using LeanCloud.Storage.Internal.Persistence; namespace LeanCloud { diff --git a/Storage/Storage/Public/LCStorage.cs b/Storage/Storage/Internal/LCStorage.cs similarity index 96% rename from Storage/Storage/Public/LCStorage.cs rename to Storage/Storage/Internal/LCStorage.cs index 0ba1102..3054274 100644 --- a/Storage/Storage/Public/LCStorage.cs +++ b/Storage/Storage/Internal/LCStorage.cs @@ -1,6 +1,6 @@ using LeanCloud.Common; -namespace LeanCloud.Storage { +namespace LeanCloud.Storage.Internal { public class LCStorage { private const string SessionHeaderKey = "X-LC-Session"; From 2fedc04ac73e64484c0a866e9c422c7c52418909 Mon Sep 17 00:00:00 2001 From: oneRain Date: Tue, 20 Apr 2021 11:24:08 +0800 Subject: [PATCH 07/71] doc: ILCIMSignatureFactory.cs --- Realtime/Realtime/Public/Signature/ILCIMSignatureFactory.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Realtime/Realtime/Public/Signature/ILCIMSignatureFactory.cs b/Realtime/Realtime/Public/Signature/ILCIMSignatureFactory.cs index 7cd9fc6..a3b6127 100644 --- a/Realtime/Realtime/Public/Signature/ILCIMSignatureFactory.cs +++ b/Realtime/Realtime/Public/Signature/ILCIMSignatureFactory.cs @@ -3,7 +3,7 @@ using System.Threading.Tasks; namespace LeanCloud.Realtime { /// - /// + /// ILCIMSignatureFactory is an interface that creates the signature of realtime. /// public interface ILCIMSignatureFactory { Task CreateConnectSignature(string clientId); From 765b301d40f4b89e15a2467cb8a46c78909b355c Mon Sep 17 00:00:00 2001 From: oneRain Date: Tue, 20 Apr 2021 11:29:59 +0800 Subject: [PATCH 08/71] doc: live query --- LiveQuery/LiveQuery/Public/LCLiveQuery.cs | 2 +- LiveQuery/LiveQuery/Public/LCQueryExtension.cs | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/LiveQuery/LiveQuery/Public/LCLiveQuery.cs b/LiveQuery/LiveQuery/Public/LCLiveQuery.cs index 1976ca5..4626360 100644 --- a/LiveQuery/LiveQuery/Public/LCLiveQuery.cs +++ b/LiveQuery/LiveQuery/Public/LCLiveQuery.cs @@ -10,7 +10,7 @@ using LeanCloud.LiveQuery.Internal; namespace LeanCloud.LiveQuery { /// - /// LiveQuery + /// LCLiveQuery provides the live query in LeanCloud. /// public class LCLiveQuery { /// diff --git a/LiveQuery/LiveQuery/Public/LCQueryExtension.cs b/LiveQuery/LiveQuery/Public/LCQueryExtension.cs index 66c7ec9..c26c83a 100644 --- a/LiveQuery/LiveQuery/Public/LCQueryExtension.cs +++ b/LiveQuery/LiveQuery/Public/LCQueryExtension.cs @@ -2,7 +2,15 @@ using LeanCloud.Storage; namespace LeanCloud.LiveQuery { + /// + /// LCQueryExtension is the extension of query for live query. + /// public static class LCQueryExtension { + /// + /// Subscribes this LCQuery to live query. + /// + /// + /// public static async Task Subscribe(this LCQuery query) { LCLiveQuery liveQuery = new LCLiveQuery { Query = query From ae923b269155375295d1615fd6bdabd8e5d9c637 Mon Sep 17 00:00:00 2001 From: oneRain Date: Tue, 20 Apr 2021 11:58:41 +0800 Subject: [PATCH 09/71] doc: engine --- .../Attributes/LCEngineClassHookAttribute.cs | 4 ++++ .../Attributes/LCEngineFunctionAttribute.cs | 3 +++ .../LCEngineFunctionParamAttribute.cs | 3 +++ .../Attributes/LCEngineRealtimeHookAttribute.cs | 4 ++++ .../Attributes/LCEngineUserHookAttribute.cs | 4 ++++ Engine/Public/LCEngine.cs | 11 +++++++++-- Engine/Public/LCEngineRequestContext.cs | 17 ++++++++++++++--- Storage/Storage/Public/LCCloud.cs | 3 ++- 8 files changed, 43 insertions(+), 6 deletions(-) diff --git a/Engine/Public/Attributes/LCEngineClassHookAttribute.cs b/Engine/Public/Attributes/LCEngineClassHookAttribute.cs index 6fbe6d8..e62aee0 100644 --- a/Engine/Public/Attributes/LCEngineClassHookAttribute.cs +++ b/Engine/Public/Attributes/LCEngineClassHookAttribute.cs @@ -10,6 +10,10 @@ namespace LeanCloud.Engine { AfterDelete } + /// + /// LCEngineClassHookAttribute is an attribute that hooks class in engine. + /// + [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] public class LCEngineClassHookAttribute : Attribute { public string ClassName { get; diff --git a/Engine/Public/Attributes/LCEngineFunctionAttribute.cs b/Engine/Public/Attributes/LCEngineFunctionAttribute.cs index 1f4ddb0..59ce4be 100644 --- a/Engine/Public/Attributes/LCEngineFunctionAttribute.cs +++ b/Engine/Public/Attributes/LCEngineFunctionAttribute.cs @@ -1,6 +1,9 @@ using System; namespace LeanCloud.Engine { + /// + /// LCEngineFunctionAttribute is an attribute of cloud function in engine. + /// [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] public class LCEngineFunctionAttribute : Attribute { public string FunctionName { diff --git a/Engine/Public/Attributes/LCEngineFunctionParamAttribute.cs b/Engine/Public/Attributes/LCEngineFunctionParamAttribute.cs index 157608c..c762380 100644 --- a/Engine/Public/Attributes/LCEngineFunctionParamAttribute.cs +++ b/Engine/Public/Attributes/LCEngineFunctionParamAttribute.cs @@ -1,6 +1,9 @@ using System; namespace LeanCloud.Engine { + /// + /// LCEngineFunctionParamAttribute is an attribute of the parameter of cloud function in engine. + /// [AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false)] public class LCEngineFunctionParamAttribute : Attribute { public string ParamName { diff --git a/Engine/Public/Attributes/LCEngineRealtimeHookAttribute.cs b/Engine/Public/Attributes/LCEngineRealtimeHookAttribute.cs index 8c23d06..b8ea596 100644 --- a/Engine/Public/Attributes/LCEngineRealtimeHookAttribute.cs +++ b/Engine/Public/Attributes/LCEngineRealtimeHookAttribute.cs @@ -20,6 +20,10 @@ namespace LeanCloud.Engine { ClientOffline, } + /// + /// LCEngineRealtimeHookAttribute is an attribute that hooks realtime in engine. + /// + [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] public class LCEngineRealtimeHookAttribute : Attribute { public LCEngineRealtimeHookType HookType { get; diff --git a/Engine/Public/Attributes/LCEngineUserHookAttribute.cs b/Engine/Public/Attributes/LCEngineUserHookAttribute.cs index c9485f1..bf5e25d 100644 --- a/Engine/Public/Attributes/LCEngineUserHookAttribute.cs +++ b/Engine/Public/Attributes/LCEngineUserHookAttribute.cs @@ -7,6 +7,10 @@ namespace LeanCloud.Engine { OnLogin } + /// + /// LCEngineUserHookAttribute is an attribute that hooks user in engine. + /// + [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] public class LCEngineUserHookAttribute : Attribute { public LCEngineUserHookType HookType { get; diff --git a/Engine/Public/LCEngine.cs b/Engine/Public/LCEngine.cs index a71368e..0a7bc4d 100644 --- a/Engine/Public/LCEngine.cs +++ b/Engine/Public/LCEngine.cs @@ -11,6 +11,9 @@ using Microsoft.Extensions.DependencyInjection; using LeanCloud.Common; namespace LeanCloud.Engine { + /// + /// LCEngine provides the initialization of Engine in LeanCloud. + /// public class LCEngine { public const string LCEngineCORS = "LCEngineCORS"; @@ -79,6 +82,10 @@ namespace LeanCloud.Engine { public static Dictionary ClassHooks = new Dictionary(); public static Dictionary UserHooks = new Dictionary(); + /// + /// Initializes the engine with the given services. + /// + /// public static void Initialize(IServiceCollection services) { // 获取环境变量 LCLogger.Debug("-------------------------------------------------"); @@ -198,7 +205,7 @@ namespace LeanCloud.Engine { }); } - public static void PrintEnvironmentVar(string key) { + private static void PrintEnvironmentVar(string key) { LCLogger.Debug($"{key} : {Environment.GetEnvironmentVariable(key)}"); } @@ -293,7 +300,7 @@ namespace LeanCloud.Engine { } } - public static object GetFunctions(HttpRequest request) { + internal static object GetFunctions(HttpRequest request) { CheckMasterKey(request); List functions = new List(); diff --git a/Engine/Public/LCEngineRequestContext.cs b/Engine/Public/LCEngineRequestContext.cs index c04c2f9..68e9e2f 100644 --- a/Engine/Public/LCEngineRequestContext.cs +++ b/Engine/Public/LCEngineRequestContext.cs @@ -1,9 +1,11 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Threading; using LeanCloud.Storage; namespace LeanCloud.Engine { + /// + /// LCEngineRequestContext provides the context of engine request. + /// public class LCEngineRequestContext { public const string RemoteAddressKey = "__remoteAddressKey"; public const string SessionTokenKey = "__sessionToken"; @@ -31,7 +33,10 @@ namespace LeanCloud.Engine { } return requestContext.Value[key]; } - + + /// + /// The remote address of this request. + /// public static string RemoteAddress { get { object remoteAddress = Get(RemoteAddressKey); @@ -45,6 +50,9 @@ namespace LeanCloud.Engine { } } + /// + /// The session token of this request. + /// public static string SessionToken { get { object sessionToken = Get(SessionTokenKey); @@ -58,6 +66,9 @@ namespace LeanCloud.Engine { } } + /// + /// The user of this request. + /// public static LCUser CurrentUser { get { object currentUser = Get(CurrentUserKey); diff --git a/Storage/Storage/Public/LCCloud.cs b/Storage/Storage/Public/LCCloud.cs index a5dcb01..91d671e 100644 --- a/Storage/Storage/Public/LCCloud.cs +++ b/Storage/Storage/Public/LCCloud.cs @@ -6,7 +6,8 @@ using LeanCloud.Storage.Internal.Object; namespace LeanCloud.Storage { /// - /// LeanEngine + /// LCCloud contains static functions that call the cloud functions of Engine + /// in LeanCloud. /// public static class LCCloud { private const string PRODUCTION_KEY = "X-LC-Prod"; From 25962f342dee4a499cb7ee8a678859dc26f7d395 Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 12:10:34 +0800 Subject: [PATCH 10/71] Update Engine/Public/LCEngine.cs Co-authored-by: Jang Rush --- Engine/Public/LCEngine.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Engine/Public/LCEngine.cs b/Engine/Public/LCEngine.cs index 0a7bc4d..276797c 100644 --- a/Engine/Public/LCEngine.cs +++ b/Engine/Public/LCEngine.cs @@ -12,7 +12,7 @@ using LeanCloud.Common; namespace LeanCloud.Engine { /// - /// LCEngine provides the initialization of Engine in LeanCloud. + /// LCEngine provides the initialization of LeanEngine. /// public class LCEngine { public const string LCEngineCORS = "LCEngineCORS"; From efe830177370155668aeb751420972be4bdf35c9 Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 12:10:45 +0800 Subject: [PATCH 11/71] Update Engine/Public/Attributes/LCEngineClassHookAttribute.cs Co-authored-by: Jang Rush --- Engine/Public/Attributes/LCEngineClassHookAttribute.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Engine/Public/Attributes/LCEngineClassHookAttribute.cs b/Engine/Public/Attributes/LCEngineClassHookAttribute.cs index e62aee0..73bdcac 100644 --- a/Engine/Public/Attributes/LCEngineClassHookAttribute.cs +++ b/Engine/Public/Attributes/LCEngineClassHookAttribute.cs @@ -11,7 +11,7 @@ namespace LeanCloud.Engine { } /// - /// LCEngineClassHookAttribute is an attribute that hooks class in engine. + /// LCEngineClassHookAttribute is an attribute that hooks class in LeanEngine. /// [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] public class LCEngineClassHookAttribute : Attribute { From 4a2b13a2af4071522edabe6ba672bc87723e4bcb Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 12:12:23 +0800 Subject: [PATCH 12/71] Update Realtime/Realtime/Public/Conversation/LCIMChatRoom.cs Co-authored-by: Jang Rush --- Realtime/Realtime/Public/Conversation/LCIMChatRoom.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Realtime/Realtime/Public/Conversation/LCIMChatRoom.cs b/Realtime/Realtime/Public/Conversation/LCIMChatRoom.cs index 6630bcd..9110b14 100644 --- a/Realtime/Realtime/Public/Conversation/LCIMChatRoom.cs +++ b/Realtime/Realtime/Public/Conversation/LCIMChatRoom.cs @@ -36,7 +36,7 @@ namespace LeanCloud.Realtime { /// /// Flags the read status of this conversation. - /// But it's nothing to do in LCIMChatRoom. + /// But it is an no-op in LCIMChatRoom. /// /// public override Task Read() { From a821c71cb99b46ef4dc6a8c11ff313a7f8262e77 Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 12:12:40 +0800 Subject: [PATCH 13/71] Update Storage/Storage/Public/LCStatus.cs Co-authored-by: Jang Rush --- Storage/Storage/Public/LCStatus.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Storage/Storage/Public/LCStatus.cs b/Storage/Storage/Public/LCStatus.cs index e2f5942..3942e69 100644 --- a/Storage/Storage/Public/LCStatus.cs +++ b/Storage/Storage/Public/LCStatus.cs @@ -198,7 +198,7 @@ namespace LeanCloud.Storage { } /// - /// Reset the count of the status to be zero. + /// Resets the count of the status to be zero. /// /// /// From 5d32995b09a7e003aa3c8140707608682a9fa4c6 Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 12:13:49 +0800 Subject: [PATCH 14/71] Update Storage/Storage/Public/LCStatusQuery.cs Co-authored-by: Jang Rush --- Storage/Storage/Public/LCStatusQuery.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Storage/Storage/Public/LCStatusQuery.cs b/Storage/Storage/Public/LCStatusQuery.cs index 510212d..251fa92 100644 --- a/Storage/Storage/Public/LCStatusQuery.cs +++ b/Storage/Storage/Public/LCStatusQuery.cs @@ -45,7 +45,7 @@ namespace LeanCloud.Storage { } /// - /// Retrieves a list of LCStatus that satisfy the query from Server. + /// Retrieves a list of LCStatus that satisfy the query from the cloud. /// /// public new async Task> Find() { From 066f100e24ddb4d5baeb2b32ae14f8b200973b70 Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 12:14:30 +0800 Subject: [PATCH 15/71] Update Storage/Storage/Public/LCStatusQuery.cs Co-authored-by: Jang Rush --- Storage/Storage/Public/LCStatusQuery.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Storage/Storage/Public/LCStatusQuery.cs b/Storage/Storage/Public/LCStatusQuery.cs index 251fa92..dcc6632 100644 --- a/Storage/Storage/Public/LCStatusQuery.cs +++ b/Storage/Storage/Public/LCStatusQuery.cs @@ -21,7 +21,7 @@ namespace LeanCloud.Storage { } /// - /// The id since the query. + /// The since id for the query. /// public int SinceId { get; set; From c951ff2d305358097afb1da8b63a9578f87c677a Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 12:14:36 +0800 Subject: [PATCH 16/71] Update Storage/Storage/Public/LCStatusQuery.cs Co-authored-by: Jang Rush --- Storage/Storage/Public/LCStatusQuery.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Storage/Storage/Public/LCStatusQuery.cs b/Storage/Storage/Public/LCStatusQuery.cs index dcc6632..a6a8e03 100644 --- a/Storage/Storage/Public/LCStatusQuery.cs +++ b/Storage/Storage/Public/LCStatusQuery.cs @@ -14,7 +14,7 @@ namespace LeanCloud.Storage { /// public class LCStatusQuery : LCQuery { /// - /// The inboxType for query. + /// The inbox type for query. /// public string InboxType { get; set; From cf6b63eabf2f16f71159c932afdfcf2205c9614b Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 12:17:02 +0800 Subject: [PATCH 17/71] Update LiveQuery/LiveQuery/Public/LCQueryExtension.cs Co-authored-by: Jang Rush --- LiveQuery/LiveQuery/Public/LCQueryExtension.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LiveQuery/LiveQuery/Public/LCQueryExtension.cs b/LiveQuery/LiveQuery/Public/LCQueryExtension.cs index c26c83a..28cfb39 100644 --- a/LiveQuery/LiveQuery/Public/LCQueryExtension.cs +++ b/LiveQuery/LiveQuery/Public/LCQueryExtension.cs @@ -7,7 +7,7 @@ namespace LeanCloud.LiveQuery { /// public static class LCQueryExtension { /// - /// Subscribes this LCQuery to live query. + /// Subscribes a LCQuery. /// /// /// From 8b93e78afbc0d6c6fc055298ee7127a1f73e885e Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 12:17:10 +0800 Subject: [PATCH 18/71] Update LiveQuery/LiveQuery/Public/LCQueryExtension.cs Co-authored-by: Jang Rush --- LiveQuery/LiveQuery/Public/LCQueryExtension.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LiveQuery/LiveQuery/Public/LCQueryExtension.cs b/LiveQuery/LiveQuery/Public/LCQueryExtension.cs index 28cfb39..aa097ec 100644 --- a/LiveQuery/LiveQuery/Public/LCQueryExtension.cs +++ b/LiveQuery/LiveQuery/Public/LCQueryExtension.cs @@ -3,7 +3,7 @@ using LeanCloud.Storage; namespace LeanCloud.LiveQuery { /// - /// LCQueryExtension is the extension of query for live query. + /// LCQueryExtension is the extension of a LCQuery. /// public static class LCQueryExtension { /// From 346ddd47b0cf15b29a4585f4bc4c182796eceed1 Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 12:17:27 +0800 Subject: [PATCH 19/71] Update LiveQuery/LiveQuery/Public/LCLiveQuery.cs Co-authored-by: Jang Rush --- LiveQuery/LiveQuery/Public/LCLiveQuery.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LiveQuery/LiveQuery/Public/LCLiveQuery.cs b/LiveQuery/LiveQuery/Public/LCLiveQuery.cs index 4626360..6559e61 100644 --- a/LiveQuery/LiveQuery/Public/LCLiveQuery.cs +++ b/LiveQuery/LiveQuery/Public/LCLiveQuery.cs @@ -10,7 +10,7 @@ using LeanCloud.LiveQuery.Internal; namespace LeanCloud.LiveQuery { /// - /// LCLiveQuery provides the live query in LeanCloud. + /// LeanCloud LiveQuery. /// public class LCLiveQuery { /// From ced9619a9554e2d3abd9d225c31dbd18e1153957 Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 12:17:47 +0800 Subject: [PATCH 20/71] Update Storage/Storage/Public/LCUser.cs Co-authored-by: Jang Rush --- Storage/Storage/Public/LCUser.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Storage/Storage/Public/LCUser.cs b/Storage/Storage/Public/LCUser.cs index 09ff403..c1883b9 100644 --- a/Storage/Storage/Public/LCUser.cs +++ b/Storage/Storage/Public/LCUser.cs @@ -83,7 +83,7 @@ namespace LeanCloud.Storage { static LCUser currentUser; /// - /// Gets the currently logged in LCUser with a valid session, either from + /// Gets the currently logged in LCUser with a valid session, from /// memory or disk if necessary. /// /// From 802061359e665bbc1184317106a9f9106da26809 Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 12:18:02 +0800 Subject: [PATCH 21/71] Update Realtime/Realtime/Public/Conversation/LCIMChatRoom.cs Co-authored-by: Jang Rush --- Realtime/Realtime/Public/Conversation/LCIMChatRoom.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Realtime/Realtime/Public/Conversation/LCIMChatRoom.cs b/Realtime/Realtime/Public/Conversation/LCIMChatRoom.cs index 9110b14..c227253 100644 --- a/Realtime/Realtime/Public/Conversation/LCIMChatRoom.cs +++ b/Realtime/Realtime/Public/Conversation/LCIMChatRoom.cs @@ -45,7 +45,7 @@ namespace LeanCloud.Realtime { /// /// Fetchs the recipt timestamps of this conversation. - /// But it's nothing to do in LCIMChatRoom. + /// But it is an no-op in LCIMChatRoom. /// /// public override Task FetchReciptTimestamps() { From 0547e81d5f3273676afb127f02510c898317408b Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 12:18:17 +0800 Subject: [PATCH 22/71] Update Realtime/Realtime/Public/Conversation/LCIMConversationQuery.cs Co-authored-by: Jang Rush --- Realtime/Realtime/Public/Conversation/LCIMConversationQuery.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Realtime/Realtime/Public/Conversation/LCIMConversationQuery.cs b/Realtime/Realtime/Public/Conversation/LCIMConversationQuery.cs index a77099f..daf7fa5 100644 --- a/Realtime/Realtime/Public/Conversation/LCIMConversationQuery.cs +++ b/Realtime/Realtime/Public/Conversation/LCIMConversationQuery.cs @@ -7,7 +7,7 @@ using System; namespace LeanCloud.Realtime { /// - /// LCIMConversationQuery is the query for conversation. + /// LCIMConversationQuery is the query for conversations. /// public class LCIMConversationQuery { internal const int CompactFlag = 0x1; From 178ebb703fd79e8b6c17830ac4404304d52c1efb Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 12:19:43 +0800 Subject: [PATCH 23/71] Update Realtime/Realtime/Public/Conversation/LCIMMessageQueryOptions.cs Co-authored-by: Jang Rush --- .../Realtime/Public/Conversation/LCIMMessageQueryOptions.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Realtime/Realtime/Public/Conversation/LCIMMessageQueryOptions.cs b/Realtime/Realtime/Public/Conversation/LCIMMessageQueryOptions.cs index 5f1aae3..de2b79e 100644 --- a/Realtime/Realtime/Public/Conversation/LCIMMessageQueryOptions.cs +++ b/Realtime/Realtime/Public/Conversation/LCIMMessageQueryOptions.cs @@ -2,8 +2,7 @@ namespace LeanCloud.Realtime { /// - /// LCIMMessageQueryEndpoint is the parameter that controls the limitation - /// of querying messages. + /// LCIMMessageQueryEndpoint limits the query results. /// public class LCIMMessageQueryEndpoint { public string MessageId { From f5bd431cc798be85248337ddbe25d42830ad9899 Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 12:36:42 +0800 Subject: [PATCH 24/71] Update Realtime/Realtime/Public/Result/LCIMPageResult.cs Co-authored-by: Jang Rush --- Realtime/Realtime/Public/Result/LCIMPageResult.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Realtime/Realtime/Public/Result/LCIMPageResult.cs b/Realtime/Realtime/Public/Result/LCIMPageResult.cs index 259dfb9..47c966b 100644 --- a/Realtime/Realtime/Public/Result/LCIMPageResult.cs +++ b/Realtime/Realtime/Public/Result/LCIMPageResult.cs @@ -2,7 +2,7 @@ namespace LeanCloud.Realtime { /// - /// LCIMPageResult represents the results of query. + /// LCIMPageResult represents the query results. /// public class LCIMPageResult { public ReadOnlyCollection Results { From c4536d5b18820a093623f9e29edff1cc2d3a38c1 Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 12:38:34 +0800 Subject: [PATCH 25/71] Update Realtime/Realtime/Public/Result/LCIMOperationFailure.cs Co-authored-by: Jang Rush --- Realtime/Realtime/Public/Result/LCIMOperationFailure.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Realtime/Realtime/Public/Result/LCIMOperationFailure.cs b/Realtime/Realtime/Public/Result/LCIMOperationFailure.cs index e282a12..543c959 100644 --- a/Realtime/Realtime/Public/Result/LCIMOperationFailure.cs +++ b/Realtime/Realtime/Public/Result/LCIMOperationFailure.cs @@ -2,7 +2,7 @@ namespace LeanCloud.Realtime { /// - /// LCIMOperationFailure is the result that handles the operation of conversation. + /// LCIMOperationFailure is the failed result of a conversation operation. /// public class LCIMOperationFailure { public int Code { From f3954727591bf1eab5ee8be9846bdefc5b2eae8d Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 14:18:13 +0800 Subject: [PATCH 26/71] Update Realtime/Realtime/Public/Result/LCIMPartiallySuccessResult.cs batch Co-authored-by: Jang Rush --- Realtime/Realtime/Public/Result/LCIMPartiallySuccessResult.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Realtime/Realtime/Public/Result/LCIMPartiallySuccessResult.cs b/Realtime/Realtime/Public/Result/LCIMPartiallySuccessResult.cs index 92e008a..ab46cab 100644 --- a/Realtime/Realtime/Public/Result/LCIMPartiallySuccessResult.cs +++ b/Realtime/Realtime/Public/Result/LCIMPartiallySuccessResult.cs @@ -2,7 +2,7 @@ namespace LeanCloud.Realtime { /// - /// LCIMPartiallySuccessResult is the result that handles the operation of conversation. + /// LCIMPartiallySuccessResult is the partially successful result of a conversation operation. /// public class LCIMPartiallySuccessResult { public List SuccessfulClientIdList { From de9cbef36d7f30c48ada79c82fea95b780920ac7 Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 14:19:32 +0800 Subject: [PATCH 27/71] Update Realtime/Realtime/Public/Signature/ILCIMSignatureFactory.cs Co-authored-by: Jang Rush --- Realtime/Realtime/Public/Signature/ILCIMSignatureFactory.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Realtime/Realtime/Public/Signature/ILCIMSignatureFactory.cs b/Realtime/Realtime/Public/Signature/ILCIMSignatureFactory.cs index a3b6127..3d9e76e 100644 --- a/Realtime/Realtime/Public/Signature/ILCIMSignatureFactory.cs +++ b/Realtime/Realtime/Public/Signature/ILCIMSignatureFactory.cs @@ -3,7 +3,7 @@ using System.Threading.Tasks; namespace LeanCloud.Realtime { /// - /// ILCIMSignatureFactory is an interface that creates the signature of realtime. + /// ILCIMSignatureFactory is an interface that creates a LCRealtime signature. /// public interface ILCIMSignatureFactory { Task CreateConnectSignature(string clientId); From 68cc975c5f6600793bd2345dc5223c0a12dbcccb Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 14:19:57 +0800 Subject: [PATCH 28/71] Update Storage/Storage.Unity/Public/LCApplication.cs Co-authored-by: Jang Rush --- Storage/Storage.Unity/Public/LCApplication.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Storage/Storage.Unity/Public/LCApplication.cs b/Storage/Storage.Unity/Public/LCApplication.cs index 152a004..ce1cdfa 100644 --- a/Storage/Storage.Unity/Public/LCApplication.cs +++ b/Storage/Storage.Unity/Public/LCApplication.cs @@ -9,8 +9,8 @@ namespace LeanCloud { /// public class LCApplication { /// - /// Whether or not ths SDK using master key. - /// Default is false. + /// Uses the master key or not. + /// The default is false. /// public static bool UseMasterKey { get => LCCore.UseMasterKey; From e6a50459c7014515a9c650ae3c7d1362bb7b3684 Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 14:20:15 +0800 Subject: [PATCH 29/71] Update Storage/Storage.Unity/Public/LCApplication.cs Co-authored-by: Jang Rush --- Storage/Storage.Unity/Public/LCApplication.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Storage/Storage.Unity/Public/LCApplication.cs b/Storage/Storage.Unity/Public/LCApplication.cs index ce1cdfa..28b390d 100644 --- a/Storage/Storage.Unity/Public/LCApplication.cs +++ b/Storage/Storage.Unity/Public/LCApplication.cs @@ -24,7 +24,7 @@ namespace LeanCloud { /// /// The application id provided in LeanCloud dashboard. /// The application key provided in LeanCloud dashboard. - /// The server url bound by yourself. + /// 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, From 6949af5f75d6a363d88f7ea90c8a7c6be89e2ea0 Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 14:20:35 +0800 Subject: [PATCH 30/71] Update Storage/Storage/Public/LCACL.cs Co-authored-by: Jang Rush --- Storage/Storage/Public/LCACL.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Storage/Storage/Public/LCACL.cs b/Storage/Storage/Public/LCACL.cs index f504294..ea401b9 100644 --- a/Storage/Storage/Public/LCACL.cs +++ b/Storage/Storage/Public/LCACL.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; namespace LeanCloud.Storage { /// /// LCACL is used to control which users and roles can access or modify - /// a particular object. Each LCObject can have its own LCObject. + /// a particular object. Each LCObject can have its own LCACL. /// public class LCACL { const string PublicKey = "*"; From ced7eb4350d00a955712374221f1e290b029770e Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 14:21:39 +0800 Subject: [PATCH 31/71] Update Storage/Storage/Public/LCACL.cs Co-authored-by: Jang Rush --- Storage/Storage/Public/LCACL.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Storage/Storage/Public/LCACL.cs b/Storage/Storage/Public/LCACL.cs index ea401b9..3a6714c 100644 --- a/Storage/Storage/Public/LCACL.cs +++ b/Storage/Storage/Public/LCACL.cs @@ -36,7 +36,7 @@ namespace LeanCloud.Storage { } /// - /// Gets or sets whether the public is allowed to read this object. + /// Gets or sets whether everyone is allowed to read this object. /// public bool PublicReadAccess { get { From 9e25787373c0ab3cd0f4a102ec0018912371ad66 Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 14:21:58 +0800 Subject: [PATCH 32/71] Update Storage/Storage/Public/LCACL.cs Co-authored-by: Jang Rush --- Storage/Storage/Public/LCACL.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Storage/Storage/Public/LCACL.cs b/Storage/Storage/Public/LCACL.cs index 3a6714c..3a1182d 100644 --- a/Storage/Storage/Public/LCACL.cs +++ b/Storage/Storage/Public/LCACL.cs @@ -47,7 +47,7 @@ namespace LeanCloud.Storage { } /// - /// Gets or sets whether the public is allowed to write this object. + /// Gets or sets whether everyone is allowed to write this object. /// public bool PublicWriteAccess { get { From 01fd804cdc64c372191ff1db24fa69f45fbbd1fc Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 14:22:14 +0800 Subject: [PATCH 33/71] Update Storage/Storage/Public/LCACL.cs Co-authored-by: Jang Rush --- Storage/Storage/Public/LCACL.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Storage/Storage/Public/LCACL.cs b/Storage/Storage/Public/LCACL.cs index 3a1182d..c1a23bd 100644 --- a/Storage/Storage/Public/LCACL.cs +++ b/Storage/Storage/Public/LCACL.cs @@ -58,7 +58,7 @@ namespace LeanCloud.Storage { } /// - /// Gets whether the given user id is *explicitly* allowed to read this + /// Detects whether the given user id is *explicitly* allowed to read this /// object. Even if this returns false, the user may still be able to read /// it if is true or a role that the user /// belongs to has read access. From e4397e3ceee993e01c4bbe2e69b5abe16c9a007b Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 14:22:30 +0800 Subject: [PATCH 34/71] Update Storage/Storage/Public/LCACL.cs Co-authored-by: Jang Rush --- Storage/Storage/Public/LCACL.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Storage/Storage/Public/LCACL.cs b/Storage/Storage/Public/LCACL.cs index c1a23bd..f05a975 100644 --- a/Storage/Storage/Public/LCACL.cs +++ b/Storage/Storage/Public/LCACL.cs @@ -85,7 +85,7 @@ namespace LeanCloud.Storage { } /// - /// Gets whether the given user id is *explicitly* allowed to write this + /// Detects whether the given user id is *explicitly* allowed to write this /// object. Even if this returns false, the user may still be able to write /// it if is true or a role that the user /// belongs to has read access. From 2a3c2d811bf1a19df082356789a56e99a5e83481 Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 14:22:46 +0800 Subject: [PATCH 35/71] Update Storage/Storage/Public/LCACL.cs Co-authored-by: Jang Rush --- Storage/Storage/Public/LCACL.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Storage/Storage/Public/LCACL.cs b/Storage/Storage/Public/LCACL.cs index f05a975..383e60d 100644 --- a/Storage/Storage/Public/LCACL.cs +++ b/Storage/Storage/Public/LCACL.cs @@ -111,7 +111,7 @@ namespace LeanCloud.Storage { } /// - /// Gets whether the given user is *explicitly* allowed to read this + /// Detects whether the given user is *explicitly* allowed to read this /// object. Even if this returns false, the user may still be able to read /// it if is true or a role that the user /// belongs to has read access. From 3e3dd0430544002b2f2ee8a1fa40133ae3a5a669 Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 14:23:10 +0800 Subject: [PATCH 36/71] Update Storage/Storage/Public/LCACL.cs Co-authored-by: Jang Rush --- Storage/Storage/Public/LCACL.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Storage/Storage/Public/LCACL.cs b/Storage/Storage/Public/LCACL.cs index 383e60d..410e9ca 100644 --- a/Storage/Storage/Public/LCACL.cs +++ b/Storage/Storage/Public/LCACL.cs @@ -138,7 +138,7 @@ namespace LeanCloud.Storage { } /// - /// Gets whether the given user is *explicitly* allowed to write this + /// Detects whether the given user is *explicitly* allowed to write this /// object. Even if this returns false, the user may still be able to write /// it if is true or a role that the user /// belongs to has write access. From e97da0ab559adf84dd0b35682d2dc89738401214 Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 14:23:27 +0800 Subject: [PATCH 37/71] Update Storage/Storage/Public/LCACL.cs Co-authored-by: Jang Rush --- Storage/Storage/Public/LCACL.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Storage/Storage/Public/LCACL.cs b/Storage/Storage/Public/LCACL.cs index 410e9ca..1d5e2e4 100644 --- a/Storage/Storage/Public/LCACL.cs +++ b/Storage/Storage/Public/LCACL.cs @@ -165,7 +165,7 @@ namespace LeanCloud.Storage { } /// - /// Get whether the given role are allowed to read this object. + /// Detects whether the given role are allowed to read this object. /// /// The role to check. /// From 1b750f4e931b87c5f506055cf405b4c8b5d032c8 Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 14:24:05 +0800 Subject: [PATCH 38/71] Update Storage/Storage/Public/LCACL.cs Co-authored-by: Jang Rush --- Storage/Storage/Public/LCACL.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Storage/Storage/Public/LCACL.cs b/Storage/Storage/Public/LCACL.cs index 1d5e2e4..16646f9 100644 --- a/Storage/Storage/Public/LCACL.cs +++ b/Storage/Storage/Public/LCACL.cs @@ -191,7 +191,7 @@ namespace LeanCloud.Storage { } /// - /// Get whether the given role are allowed to write this object. + /// Detects whether the given role are allowed to write this object. /// /// The role to check. /// From 83f8a60634fbedea9d31bdd679137a7237c84705 Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 14:24:57 +0800 Subject: [PATCH 39/71] Update Storage/Storage/Public/LCCloud.cs Co-authored-by: Jang Rush --- Storage/Storage/Public/LCCloud.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Storage/Storage/Public/LCCloud.cs b/Storage/Storage/Public/LCCloud.cs index 91d671e..b91c1ed 100644 --- a/Storage/Storage/Public/LCCloud.cs +++ b/Storage/Storage/Public/LCCloud.cs @@ -6,8 +6,7 @@ using LeanCloud.Storage.Internal.Object; namespace LeanCloud.Storage { /// - /// LCCloud contains static functions that call the cloud functions of Engine - /// in LeanCloud. + /// LCCloud contains static functions that call LeanEngine cloud functions. /// public static class LCCloud { private const string PRODUCTION_KEY = "X-LC-Prod"; From 459aba9b9ad8e881d811c28e6bb76bb0f437ee5c Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 14:25:17 +0800 Subject: [PATCH 40/71] Update Storage/Storage/Public/LCCloud.cs Co-authored-by: Jang Rush --- Storage/Storage/Public/LCCloud.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Storage/Storage/Public/LCCloud.cs b/Storage/Storage/Public/LCCloud.cs index b91c1ed..3fbe1ba 100644 --- a/Storage/Storage/Public/LCCloud.cs +++ b/Storage/Storage/Public/LCCloud.cs @@ -42,7 +42,7 @@ namespace LeanCloud.Storage { /// /// The type of return value. /// Cloud function name. - /// Parameters of cloud function. + /// Parameters of the cloud function. /// public static async Task Run(string name, Dictionary parameters = null) { From 3dafa2487410687710f084bd9f6f92dad2f31ef1 Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 14:25:36 +0800 Subject: [PATCH 41/71] Update Storage/Storage/Public/LCFile.cs Co-authored-by: Jang Rush --- Storage/Storage/Public/LCFile.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Storage/Storage/Public/LCFile.cs b/Storage/Storage/Public/LCFile.cs index 94607d6..6b8ea25 100644 --- a/Storage/Storage/Public/LCFile.cs +++ b/Storage/Storage/Public/LCFile.cs @@ -8,7 +8,7 @@ using LeanCloud.Storage.Internal.Object; namespace LeanCloud.Storage { /// - /// LCFile is a local representation of a file that is saved to LeanCloud. + /// LCFile is a local representation of a LeanCloud file. /// public class LCFile : LCObject { public const string CLASS_NAME = "_File"; From 30c615b023ac0eba406b0f947e67c54c1f99ebd7 Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 14:26:35 +0800 Subject: [PATCH 42/71] Update Storage/Storage/Public/LCFile.cs Co-authored-by: Jang Rush --- Storage/Storage/Public/LCFile.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Storage/Storage/Public/LCFile.cs b/Storage/Storage/Public/LCFile.cs index 6b8ea25..3300011 100644 --- a/Storage/Storage/Public/LCFile.cs +++ b/Storage/Storage/Public/LCFile.cs @@ -67,7 +67,7 @@ namespace LeanCloud.Storage { } /// - /// Creates a new file from a byte array and a name. + /// Creates a new file from a byte array. /// /// /// From 856224efdb87818a68c28c763eb144d29f26ca37 Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 14:26:59 +0800 Subject: [PATCH 43/71] Update Storage/Storage/Public/LCFile.cs Co-authored-by: Jang Rush --- Storage/Storage/Public/LCFile.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Storage/Storage/Public/LCFile.cs b/Storage/Storage/Public/LCFile.cs index 3300011..d254611 100644 --- a/Storage/Storage/Public/LCFile.cs +++ b/Storage/Storage/Public/LCFile.cs @@ -77,7 +77,7 @@ namespace LeanCloud.Storage { } /// - /// Creates a new file from a local file and a name. + /// Creates a new file from a local file. /// /// /// From a6bef527a5e6aa8cd390c051f19aa2b1034f9e28 Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 14:29:39 +0800 Subject: [PATCH 44/71] Update Storage/Storage/Public/LCFile.cs Co-authored-by: Jang Rush --- Storage/Storage/Public/LCFile.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Storage/Storage/Public/LCFile.cs b/Storage/Storage/Public/LCFile.cs index d254611..d2d19ed 100644 --- a/Storage/Storage/Public/LCFile.cs +++ b/Storage/Storage/Public/LCFile.cs @@ -88,7 +88,8 @@ namespace LeanCloud.Storage { } /// - /// Creates a new file from an url and a name. + /// Creates a new external file from an url. + /// The file content is saved externally, not copied to LeanCloud. /// /// /// From 45d1fbcdb42f9f17852e289dd79a0d753fd8fd24 Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 14:30:42 +0800 Subject: [PATCH 45/71] Update Storage/Storage/Public/LCFile.cs Co-authored-by: Jang Rush --- Storage/Storage/Public/LCFile.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Storage/Storage/Public/LCFile.cs b/Storage/Storage/Public/LCFile.cs index d2d19ed..67c2413 100644 --- a/Storage/Storage/Public/LCFile.cs +++ b/Storage/Storage/Public/LCFile.cs @@ -165,7 +165,7 @@ namespace LeanCloud.Storage { } /// - /// Gets the thumbnail url of image file. + /// Gets the thumbnail url of an image file. /// /// /// From 794d811b7cd638dda256e91488e02c67e3560b61 Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 14:31:05 +0800 Subject: [PATCH 46/71] Update Storage/Storage/Public/LCFile.cs Co-authored-by: Jang Rush --- Storage/Storage/Public/LCFile.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Storage/Storage/Public/LCFile.cs b/Storage/Storage/Public/LCFile.cs index 67c2413..7ed0658 100644 --- a/Storage/Storage/Public/LCFile.cs +++ b/Storage/Storage/Public/LCFile.cs @@ -99,7 +99,7 @@ namespace LeanCloud.Storage { } /// - /// Add metadata. + /// Adds metadata. /// /// /// From 53961921039638185fe0e0e5c8dda7b6c89a5619 Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 14:31:30 +0800 Subject: [PATCH 47/71] Update Storage/Storage/Public/LCFollowersAndFollowees.cs Co-authored-by: Jang Rush --- Storage/Storage/Public/LCFollowersAndFollowees.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Storage/Storage/Public/LCFollowersAndFollowees.cs b/Storage/Storage/Public/LCFollowersAndFollowees.cs index 33885a3..513f627 100644 --- a/Storage/Storage/Public/LCFollowersAndFollowees.cs +++ b/Storage/Storage/Public/LCFollowersAndFollowees.cs @@ -2,7 +2,7 @@ namespace LeanCloud.Storage { /// - /// LCFollowersAndFollowees is a result that contains followers and followees. + /// LCFollowersAndFollowees contains followers and followees. /// public class LCFollowersAndFollowees { /// From e8d97955594138fd91cc3752330d49ba1655b38b Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 14:31:55 +0800 Subject: [PATCH 48/71] Update Storage/Storage/Public/LCFriendship.cs Co-authored-by: Jang Rush --- Storage/Storage/Public/LCFriendship.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Storage/Storage/Public/LCFriendship.cs b/Storage/Storage/Public/LCFriendship.cs index 191a701..8409289 100644 --- a/Storage/Storage/Public/LCFriendship.cs +++ b/Storage/Storage/Public/LCFriendship.cs @@ -6,7 +6,7 @@ using LeanCloud.Storage.Internal.Codec; namespace LeanCloud.Storage { /// - /// LCFriendship contains static functions that handle the friendship of LeanCloud. + /// LCFriendship contains static functions that handle LCFriendship. /// public static class LCFriendship { /// From 295874df590d021b0d5bc6e7e2da6d237fb423b4 Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 14:32:19 +0800 Subject: [PATCH 49/71] Update Storage/Storage/Public/LCFriendship.cs Co-authored-by: Jang Rush --- Storage/Storage/Public/LCFriendship.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Storage/Storage/Public/LCFriendship.cs b/Storage/Storage/Public/LCFriendship.cs index 8409289..842647e 100644 --- a/Storage/Storage/Public/LCFriendship.cs +++ b/Storage/Storage/Public/LCFriendship.cs @@ -10,7 +10,7 @@ namespace LeanCloud.Storage { /// public static class LCFriendship { /// - /// Requests to add friend. + /// Requests to add a friend. /// /// The user id to add. /// The additional attributes for the friendship. From a6e366d95a1b2dd35a5dfdda371a0b0478a6feaa Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 14:32:48 +0800 Subject: [PATCH 50/71] Update Storage/Storage/Public/LCFriendship.cs Co-authored-by: Jang Rush --- Storage/Storage/Public/LCFriendship.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Storage/Storage/Public/LCFriendship.cs b/Storage/Storage/Public/LCFriendship.cs index 842647e..a0bda15 100644 --- a/Storage/Storage/Public/LCFriendship.cs +++ b/Storage/Storage/Public/LCFriendship.cs @@ -33,7 +33,7 @@ namespace LeanCloud.Storage { } /// - /// Accepts the request of add friend. + /// Accepts a friend request. /// /// The request. /// The additional attributes for the friendship. From 4cb5270d5ab31c179540940511c0fe1528268dc4 Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 14:33:12 +0800 Subject: [PATCH 51/71] Update Storage/Storage/Public/LCFriendship.cs Co-authored-by: Jang Rush --- Storage/Storage/Public/LCFriendship.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Storage/Storage/Public/LCFriendship.cs b/Storage/Storage/Public/LCFriendship.cs index a0bda15..f876e7a 100644 --- a/Storage/Storage/Public/LCFriendship.cs +++ b/Storage/Storage/Public/LCFriendship.cs @@ -53,7 +53,7 @@ namespace LeanCloud.Storage { } /// - /// Declines the request of add friend. + /// Declines a friend request. /// /// The request. /// From 524bec174f5713450b303002a109083a27052150 Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 14:33:32 +0800 Subject: [PATCH 52/71] Update Storage/Storage/Public/LCGeoPoint.cs Co-authored-by: Jang Rush --- Storage/Storage/Public/LCGeoPoint.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Storage/Storage/Public/LCGeoPoint.cs b/Storage/Storage/Public/LCGeoPoint.cs index 58ca7a9..de21d17 100644 --- a/Storage/Storage/Public/LCGeoPoint.cs +++ b/Storage/Storage/Public/LCGeoPoint.cs @@ -2,7 +2,7 @@ namespace LeanCloud.Storage { /// - /// LCGeoPoint represents a latitude and longitude point that may be associated + /// LCGeoPoint represents a geographic location that may be associated /// with a key in a LCObject or used as a reference point for queries. /// public class LCGeoPoint { From fe1ec73b5c6a21c2176aaa15239cd8f406c33525 Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 14:33:55 +0800 Subject: [PATCH 53/71] Update Storage/Storage/Public/LCGeoPoint.cs Co-authored-by: Jang Rush --- Storage/Storage/Public/LCGeoPoint.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Storage/Storage/Public/LCGeoPoint.cs b/Storage/Storage/Public/LCGeoPoint.cs index de21d17..c502c1e 100644 --- a/Storage/Storage/Public/LCGeoPoint.cs +++ b/Storage/Storage/Public/LCGeoPoint.cs @@ -40,7 +40,7 @@ namespace LeanCloud.Storage { } /// - /// Calculate the distance in kilometer between this point and another GeoPoint. + /// Calculate the distance in kilometers between this point and another GeoPoint. /// /// /// From 2fe02306aebb8d58a76e8d0dad177b2f21cc0b83 Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 14:34:18 +0800 Subject: [PATCH 54/71] Update Storage/Storage/Public/LCGeoPoint.cs Co-authored-by: Jang Rush --- Storage/Storage/Public/LCGeoPoint.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Storage/Storage/Public/LCGeoPoint.cs b/Storage/Storage/Public/LCGeoPoint.cs index c502c1e..20d7f4e 100644 --- a/Storage/Storage/Public/LCGeoPoint.cs +++ b/Storage/Storage/Public/LCGeoPoint.cs @@ -52,7 +52,7 @@ namespace LeanCloud.Storage { } /// - /// Calculate the distance in mile between this point and another GeoPoint. + /// Calculate the distance in miles between this point and another GeoPoint. /// /// /// From fb842a8d02aa27f47c51477b2cc567da1feafb36 Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 14:34:41 +0800 Subject: [PATCH 55/71] Update Storage/Storage/Public/LCHookObject.cs Co-authored-by: Jang Rush --- Storage/Storage/Public/LCHookObject.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Storage/Storage/Public/LCHookObject.cs b/Storage/Storage/Public/LCHookObject.cs index 62b0f2a..d622b82 100644 --- a/Storage/Storage/Public/LCHookObject.cs +++ b/Storage/Storage/Public/LCHookObject.cs @@ -21,7 +21,7 @@ namespace LeanCloud.Storage { internal const string IgnoreHooksKey = "__ignore_hooks"; /// - /// Disable to hook before saving / updating / deleting LCObject. + /// Disable hooks before saving / updating / deleting LCObject. /// public void DisableBeforeHook() { Ignore( From c2aaa5f99668bf1f0e031e33a46bed899dd28090 Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 14:36:29 +0800 Subject: [PATCH 56/71] Update Storage/Storage/Public/LCHookObject.cs Co-authored-by: Jang Rush --- Storage/Storage/Public/LCHookObject.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Storage/Storage/Public/LCHookObject.cs b/Storage/Storage/Public/LCHookObject.cs index d622b82..ea25051 100644 --- a/Storage/Storage/Public/LCHookObject.cs +++ b/Storage/Storage/Public/LCHookObject.cs @@ -31,7 +31,7 @@ namespace LeanCloud.Storage { } /// - /// Disable to hook after saving / updating / deleting LCObject. + /// Disable hooks after saving / updating / deleting LCObject. /// public void DisableAfterHook() { Ignore( From c664a4d7aa7568f07036dbeb1d97ea7a71ff8a46 Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 14:36:53 +0800 Subject: [PATCH 57/71] Update Storage/Storage/Public/LCObject.cs Co-authored-by: Jang Rush --- Storage/Storage/Public/LCObject.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Storage/Storage/Public/LCObject.cs b/Storage/Storage/Public/LCObject.cs index 8aa072e..059139e 100644 --- a/Storage/Storage/Public/LCObject.cs +++ b/Storage/Storage/Public/LCObject.cs @@ -34,7 +34,7 @@ namespace LeanCloud.Storage { } /// - /// Gets the object id. An object id is assigned as son as an object is + /// Gets the object id. An object id is assigned as soon as an object is /// saved to the server. The combination of a and /// an uniquely identifies an object in your application. /// From 5bde1b1e2f78eea073a421742984f4afb405f45a Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 14:37:17 +0800 Subject: [PATCH 58/71] Update Storage/Storage/Public/LCObject.cs Co-authored-by: Jang Rush --- Storage/Storage/Public/LCObject.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Storage/Storage/Public/LCObject.cs b/Storage/Storage/Public/LCObject.cs index 059139e..6276b26 100644 --- a/Storage/Storage/Public/LCObject.cs +++ b/Storage/Storage/Public/LCObject.cs @@ -45,7 +45,7 @@ namespace LeanCloud.Storage { } /// - /// Gets the first time of this object was saved the server. + /// Gets the creation time of this object in the cloud. /// public DateTime CreatedAt { get { From f7e3f4241bb9535fef197c26044e8b489f74a8e6 Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 14:37:57 +0800 Subject: [PATCH 59/71] Update Storage/Storage/Public/LCObject.cs Co-authored-by: Jang Rush --- Storage/Storage/Public/LCObject.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Storage/Storage/Public/LCObject.cs b/Storage/Storage/Public/LCObject.cs index 6276b26..e7e614d 100644 --- a/Storage/Storage/Public/LCObject.cs +++ b/Storage/Storage/Public/LCObject.cs @@ -54,7 +54,7 @@ namespace LeanCloud.Storage { } /// - /// Gets the last time of this object was updated the server. + /// Gets the latest update time of this object in the cloud. /// public DateTime UpdatedAt { get { From a8a614545d5860965af6efbf6466db7931648d58 Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 14:38:28 +0800 Subject: [PATCH 60/71] Update Storage/Storage/Public/LCObject.cs Co-authored-by: Jang Rush --- Storage/Storage/Public/LCObject.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Storage/Storage/Public/LCObject.cs b/Storage/Storage/Public/LCObject.cs index e7e614d..d3ed282 100644 --- a/Storage/Storage/Public/LCObject.cs +++ b/Storage/Storage/Public/LCObject.cs @@ -83,7 +83,7 @@ namespace LeanCloud.Storage { /// /// Constructs a new LCObject with no data in it. A LCObject constructed - /// in this way will not have an ObjectedId and will not persist to database + /// in this way will not have an ObjectedId and will not persist in the cloud /// until is called. /// /// The className for the LCObject. From 39524fd6262dd80fabebe528820066405b6cb9dc Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 14:38:54 +0800 Subject: [PATCH 61/71] Update Storage/Storage/Public/LCObject.cs Co-authored-by: Jang Rush --- Storage/Storage/Public/LCObject.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Storage/Storage/Public/LCObject.cs b/Storage/Storage/Public/LCObject.cs index d3ed282..dc5b6cc 100644 --- a/Storage/Storage/Public/LCObject.cs +++ b/Storage/Storage/Public/LCObject.cs @@ -100,8 +100,7 @@ namespace LeanCloud.Storage { } /// - /// Creates a reference to an existing LCObject for use in creating - /// associations between LCObjects. + /// Creates a reference to an existing LCObject. /// /// The className for the LCObject. /// The object id for the LCObject. From 99df5c00a61bd2223e68cbb0109b3b49fa9133c5 Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 14:39:21 +0800 Subject: [PATCH 62/71] Update Storage/Storage/Public/LCObject.cs Co-authored-by: Jang Rush --- Storage/Storage/Public/LCObject.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Storage/Storage/Public/LCObject.cs b/Storage/Storage/Public/LCObject.cs index dc5b6cc..2ef9359 100644 --- a/Storage/Storage/Public/LCObject.cs +++ b/Storage/Storage/Public/LCObject.cs @@ -116,8 +116,7 @@ namespace LeanCloud.Storage { } /// - /// Creates a reference to an existing LCObject for use in creating - /// associations between LCObjects. + /// Creates a new LCObject. /// /// The className for the LCObject. /// From f45f1f21aa31720452f3d2ccb3858e30978fab61 Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 14:39:50 +0800 Subject: [PATCH 63/71] Update Storage/Storage/Public/LCObject.cs Co-authored-by: Jang Rush --- Storage/Storage/Public/LCObject.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Storage/Storage/Public/LCObject.cs b/Storage/Storage/Public/LCObject.cs index 2ef9359..61be51c 100644 --- a/Storage/Storage/Public/LCObject.cs +++ b/Storage/Storage/Public/LCObject.cs @@ -136,7 +136,7 @@ namespace LeanCloud.Storage { /// /// Gets or sets a value on the object. It is forbidden to name keys - /// with '_'. + /// with a leading underscore ('_'). /// /// The value for key. /// From b149a8b5a47e8bc93eaf02df052e261f0b8c237a Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 14:40:17 +0800 Subject: [PATCH 64/71] Update Storage/Storage/Public/LCObject.cs Co-authored-by: Jang Rush --- Storage/Storage/Public/LCObject.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Storage/Storage/Public/LCObject.cs b/Storage/Storage/Public/LCObject.cs index 61be51c..623af16 100644 --- a/Storage/Storage/Public/LCObject.cs +++ b/Storage/Storage/Public/LCObject.cs @@ -138,7 +138,7 @@ namespace LeanCloud.Storage { /// Gets or sets a value on the object. It is forbidden to name keys /// with a leading underscore ('_'). /// - /// The value for key. + /// The name of a key. /// public object this[string key] { get { From 6f166a5fa309298e604f12008e93bfb313e7fd92 Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 14:40:43 +0800 Subject: [PATCH 65/71] Update Storage/Storage/Public/LCObject.cs Co-authored-by: Jang Rush --- Storage/Storage/Public/LCObject.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Storage/Storage/Public/LCObject.cs b/Storage/Storage/Public/LCObject.cs index 623af16..1883022 100644 --- a/Storage/Storage/Public/LCObject.cs +++ b/Storage/Storage/Public/LCObject.cs @@ -367,7 +367,7 @@ namespace LeanCloud.Storage { } /// - /// Saves this object to the server. + /// Saves this object to the cloud. /// /// Whether or not fetch data when saved. /// The condition for saving. From 83331b8f8e691806975c60e550ef9f319178cc62 Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 14:41:12 +0800 Subject: [PATCH 66/71] Update Storage/Storage/Public/LCObject.cs Co-authored-by: Jang Rush --- Storage/Storage/Public/LCObject.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Storage/Storage/Public/LCObject.cs b/Storage/Storage/Public/LCObject.cs index 1883022..f6d6f7b 100644 --- a/Storage/Storage/Public/LCObject.cs +++ b/Storage/Storage/Public/LCObject.cs @@ -418,7 +418,7 @@ namespace LeanCloud.Storage { } /// - /// Deletes this object on the server. + /// Deletes this object in the cloud. /// /// public async Task Delete() { From 2709a8424868dabd7f4e30e316cbcce44737ad21 Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 14:41:43 +0800 Subject: [PATCH 67/71] Update Storage/Storage/Public/LCObject.cs Co-authored-by: Jang Rush --- Storage/Storage/Public/LCObject.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Storage/Storage/Public/LCObject.cs b/Storage/Storage/Public/LCObject.cs index f6d6f7b..38d5e9c 100644 --- a/Storage/Storage/Public/LCObject.cs +++ b/Storage/Storage/Public/LCObject.cs @@ -453,7 +453,7 @@ namespace LeanCloud.Storage { } /// - /// Fetches this object from server. + /// Fetches this object from the cloud. /// /// The keys for fetching. /// The include keys for fetching. From d7ea1bc965f844ab62cc3b194d497b1f0d42b4b4 Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 14:42:11 +0800 Subject: [PATCH 68/71] Update Storage/Storage/Public/LCQuery.cs Co-authored-by: Jang Rush --- Storage/Storage/Public/LCQuery.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Storage/Storage/Public/LCQuery.cs b/Storage/Storage/Public/LCQuery.cs index 2cacc61..0bb7935 100644 --- a/Storage/Storage/Public/LCQuery.cs +++ b/Storage/Storage/Public/LCQuery.cs @@ -390,7 +390,7 @@ namespace LeanCloud.Storage { /// /// Constructs a LCObject whose id is already known by fetching data - /// from the server. + /// from the cloud. /// /// /// From 84b008309aba6dc534b8e191cba7bf1bd86f8996 Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 14:42:38 +0800 Subject: [PATCH 69/71] Update Storage/Storage/Public/LCRole.cs Co-authored-by: Jang Rush --- Storage/Storage/Public/LCRole.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Storage/Storage/Public/LCRole.cs b/Storage/Storage/Public/LCRole.cs index d3e6ce8..d28fba4 100644 --- a/Storage/Storage/Public/LCRole.cs +++ b/Storage/Storage/Public/LCRole.cs @@ -6,7 +6,7 @@ public const string CLASS_NAME = "_Role"; /// - /// The name of LCRole. + /// The name of a LCRole. /// public string Name { get { From 5748df373d39e21ac451d73c7797c54a5f39e996 Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 14:43:05 +0800 Subject: [PATCH 70/71] Update Storage/Storage/Public/LCStatus.cs Co-authored-by: Jang Rush --- Storage/Storage/Public/LCStatus.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Storage/Storage/Public/LCStatus.cs b/Storage/Storage/Public/LCStatus.cs index 3942e69..eaf023f 100644 --- a/Storage/Storage/Public/LCStatus.cs +++ b/Storage/Storage/Public/LCStatus.cs @@ -83,7 +83,7 @@ namespace LeanCloud.Storage { } /// - /// Sends the status to the user with targetId privatedly. + /// Sends the status to the user with targetId in private. /// /// /// From 075f3fab6a1731ddf7397e4f942a3e781ac02dc9 Mon Sep 17 00:00:00 2001 From: oneRain Date: Wed, 21 Apr 2021 14:43:30 +0800 Subject: [PATCH 71/71] Update Storage/Storage/Public/LCStatus.cs Co-authored-by: Jang Rush --- Storage/Storage/Public/LCStatus.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Storage/Storage/Public/LCStatus.cs b/Storage/Storage/Public/LCStatus.cs index eaf023f..57e1e07 100644 --- a/Storage/Storage/Public/LCStatus.cs +++ b/Storage/Storage/Public/LCStatus.cs @@ -111,7 +111,7 @@ namespace LeanCloud.Storage { } /// - /// Send this status. + /// Sends this status. /// /// public async Task Send() {