-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[HUP-799] Refactor: Classes and structs should be declared within a n…
…amespace. Namespaces are used to group related entities like classes and structs, providing scope and preventing name clashes. It is essential to declare a namespace to avoid placing entities in the global namespace. Related Issues: - [HUP-821]: Main Task
- Loading branch information
1 parent
d434dd9
commit 3b47aab
Showing
38 changed files
with
2,045 additions
and
1,968 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
using HmsPlugin; | ||
using HuaweiMobileServices.APM; | ||
|
||
using UnityEngine; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
|
||
using HmsPlugin; | ||
using UnityEngine; | ||
|
||
public class CrashDemoManager : MonoBehaviour | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
using HmsPlugin; | ||
using HuaweiMobileServices.RemoteConfig; | ||
using HuaweiMobileServices.Utils; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
using HmsPlugin; | ||
using HuaweiMobileServices.Scan; | ||
|
||
using UnityEngine; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,50 @@ | ||
using OfficeOpenXml; | ||
using OfficeOpenXml; | ||
using System; | ||
using System.IO; | ||
|
||
public static class HMSExcelHelper | ||
namespace HmsPlugin | ||
{ | ||
public static string[,] ReadExcel(string path) | ||
public static class HMSExcelHelper | ||
{ | ||
string[,] result = null; | ||
|
||
using (ExcelPackage package = new ExcelPackage(new FileInfo(path))) | ||
public static string[,] ReadExcel(string path) | ||
{ | ||
ExcelWorksheet sheet = package.Workbook.Worksheets[1]; | ||
result = ToStringArray(sheet.Cells.Value); | ||
string[,] result = null; | ||
|
||
} | ||
return result; | ||
} | ||
using (ExcelPackage package = new ExcelPackage(new FileInfo(path))) | ||
{ | ||
ExcelWorksheet sheet = package.Workbook.Worksheets[1]; | ||
result = ToStringArray(sheet.Cells.Value); | ||
|
||
private static string[,] ToStringArray(object arg) | ||
{ | ||
string[,] result = null; | ||
} | ||
return result; | ||
} | ||
|
||
if (arg is Array) | ||
private static string[,] ToStringArray(object arg) | ||
{ | ||
int rank = ((Array)arg).Rank; | ||
if (rank == 2) | ||
{ | ||
int columnCount = ((Array)arg).GetLength(1) - 1; | ||
int rowCount = ((Array)arg).GetLength(0); | ||
result = new string[rowCount, columnCount]; | ||
string[,] result = null; | ||
|
||
for (int i = 0; i < rowCount; i++) | ||
if (arg is Array) | ||
{ | ||
int rank = ((Array)arg).Rank; | ||
if (rank == 2) | ||
{ | ||
for (int j = 0; j < columnCount; j++) | ||
int columnCount = ((Array)arg).GetLength(1) - 1; | ||
int rowCount = ((Array)arg).GetLength(0); | ||
result = new string[rowCount, columnCount]; | ||
|
||
for (int i = 0; i < rowCount; i++) | ||
{ | ||
var value = ((Array)arg).GetValue(i, j); | ||
if (value != null) | ||
result[i, j] = value.ToString(); | ||
for (int j = 0; j < columnCount; j++) | ||
{ | ||
var value = ((Array)arg).GetValue(i, j); | ||
if (value != null) | ||
result[i, j] = value.ToString(); | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
return result; | ||
return result; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.