123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- namespace NRKernal
- {
- using System.Text;
-
-
- public struct AndroidPermissionsRequestResult
- {
-
-
-
- public AndroidPermissionsRequestResult(
- string[] permissionNames, bool[] grantResults) : this()
- {
- PermissionNames = permissionNames;
- GrantResults = grantResults;
- }
-
-
- public string[] PermissionNames { get; private set; }
-
-
-
- public bool[] GrantResults { get; private set; }
-
-
- public bool IsAllGranted
- {
- get
- {
- if (PermissionNames == null || GrantResults == null)
- {
- return false;
- }
- for (int i = 0; i < GrantResults.Length; i++)
- {
- if (!GrantResults[i])
- {
- return false;
- }
- }
- return true;
- }
- }
-
-
- public override string ToString()
- {
- StringBuilder st = new StringBuilder();
- for (int i = 0; i < PermissionNames.Length; i++)
- {
- st.AppendLine("Name:" + PermissionNames[i] + " GrantResult:" + GrantResults[i]);
- }
- return st.ToString();
- }
- }
- }
|