Skip to content

Commit afc1eb3

Browse files
committed
removed caps from all constants to adhere to .net naming conventions with the exception of Alchemy Data News
1 parent c2544db commit afc1eb3

File tree

32 files changed

+345
-365
lines changed

32 files changed

+345
-365
lines changed

Examples/ServiceExamples/Scripts/ExampleDocumentConversion.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public class ExampleDocumentConversion : MonoBehaviour
3434
//private string _token = "<authentication-token>";
3535

3636
private string _examplePath;
37-
private string _conversionTarget = ConversionTarget.NORMALIZED_HTML;
37+
private string _conversionTarget = ConversionTarget.NormalizedHtml;
3838
private bool _convertDocumentTested = false;
3939

4040
void Start()

Examples/ServiceExamples/Scripts/ExamplePersonalityInsightsV3.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,12 @@ void Start()
9292

9393
private IEnumerator Examples()
9494
{
95-
if (!_personalityInsights.GetProfile(OnGetProfileJson, _dataPath, ContentType.TEXT_HTML, ContentLanguage.ENGLISH, ContentType.APPLICATION_JSON, AcceptLanguage.ENGLISH, true, true, true))
95+
if (!_personalityInsights.GetProfile(OnGetProfileJson, _dataPath, ContentType.TextHtml, ContentLanguage.English, ContentType.ApplicationJson, AcceptLanguage.English, true, true, true))
9696
Log.Debug("ExamplePersonalityInsights", "Failed to get profile!");
9797
while (!_getProfileJsonTested)
9898
yield return null;
9999

100-
if (!_personalityInsights.GetProfile(OnGetProfileText, _testString, ContentType.TEXT_HTML, ContentLanguage.ENGLISH, ContentType.APPLICATION_JSON, AcceptLanguage.ENGLISH, true, true, true))
100+
if (!_personalityInsights.GetProfile(OnGetProfileText, _testString, ContentType.TextHtml, ContentLanguage.English, ContentType.ApplicationJson, AcceptLanguage.English, true, true, true))
101101
Log.Debug("ExamplePersonalityInsights", "Failed to get profile!");
102102
while (!_getProfileTextTested)
103103
yield return null;

Examples/ServiceExamples/Scripts/ExampleRetrieveAndRank.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,15 +187,15 @@ private IEnumerator Examples()
187187
_readyToContinue = false;
188188
// List Collection request
189189
Log.Debug("ExampleRetrieveAndRank", "Attempting to get collections.");
190-
if (!_retrieveAndRank.ForwardCollectionRequest(OnGetCollections, _clusterToDelete, CollectionsAction.LIST))
190+
if (!_retrieveAndRank.ForwardCollectionRequest(OnGetCollections, _clusterToDelete, CollectionsAction.List))
191191
Log.Debug("ExampleRetrieveAndRank", "Failed to get collections!");
192192
while (!_getCollectionsTested || !_readyToContinue)
193193
yield return null;
194194

195195
_readyToContinue = false;
196196
// Create Collection request
197197
Log.Debug("ExampleRetrieveAndRank", "Attempting to create collection.");
198-
if (!_retrieveAndRank.ForwardCollectionRequest(OnCreateCollection, _clusterToDelete, CollectionsAction.CREATE, _collectionNameToDelete, _testClusterConfigName))
198+
if (!_retrieveAndRank.ForwardCollectionRequest(OnCreateCollection, _clusterToDelete, CollectionsAction.Create, _collectionNameToDelete, _testClusterConfigName))
199199
Log.Debug("ExampleRetrieveAndRank", "Failed to create collections!");
200200
while (!_createCollectionTested || !_readyToContinue)
201201
yield return null;
@@ -266,7 +266,7 @@ private IEnumerator Examples()
266266
_readyToContinue = false;
267267
// Delete Collection request
268268
Log.Debug("ExampleRetrieveAndRank", "Attempting to delete collection {0}.", "TestCollectionToDelete");
269-
if (!_retrieveAndRank.ForwardCollectionRequest(OnDeleteCollection, _clusterToDelete, CollectionsAction.DELETE, "TestCollectionToDelete"))
269+
if (!_retrieveAndRank.ForwardCollectionRequest(OnDeleteCollection, _clusterToDelete, CollectionsAction.Delete, "TestCollectionToDelete"))
270270
Log.Debug("ExampleRetrieveAndRank", "Failed to delete collections!");
271271
while (!_deleteCollectionTested || !_readyToContinue)
272272
yield return null;

Scripts/Connection/RESTConnector.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ private void AddHeaders(Dictionary<string, string> headers)
298298
headers[kp.Key] = kp.Value;
299299
}
300300

301-
headers.Add("User-Agent", Constants.String.VERSION);
301+
headers.Add("User-Agent", Constants.String.Version);
302302
}
303303

304304
private IEnumerator ProcessRequestQueue()

Scripts/Editor/WatsonMenu.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ namespace IBM.Watson.DeveloperCloud.Editor
2525
{
2626
public class WatsonMenu : MonoBehaviour
2727
{
28-
private const string API_REFERENCE = "WatsonUnitySDK.chm";
28+
private const string ApiReference = "WatsonUnitySDK.chm";
2929

3030
[MenuItem("Watson/API Reference", false, 100)]
3131
private static void ShowAPIReference()
3232
{
33-
Application.OpenURL("file://" + FindFile(Application.dataPath, "Docs" + Path.DirectorySeparatorChar + "Help" + Path.DirectorySeparatorChar + API_REFERENCE));
33+
Application.OpenURL("file://" + FindFile(Application.dataPath, "Docs" + Path.DirectorySeparatorChar + "Help" + Path.DirectorySeparatorChar + ApiReference));
3434
}
3535

3636
private static string FindFile(string directory, string name)

Scripts/Logging/Logger.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,10 @@ public static void InstallDefaultReactors(int logHistory = 2, LogLevel logLevelF
142142
LogSystem.Instance.InstallReactor(new DebugReactor());
143143
#endif
144144

145-
if (!string.IsNullOrEmpty(Constants.Path.LOG_FOLDER) && !System.IO.Directory.Exists(Application.persistentDataPath + Constants.Path.LOG_FOLDER))
146-
System.IO.Directory.CreateDirectory(Application.persistentDataPath + Constants.Path.LOG_FOLDER);
145+
if (!string.IsNullOrEmpty(Constants.Path.LogDirectory) && !System.IO.Directory.Exists(Application.persistentDataPath + Constants.Path.LogDirectory))
146+
System.IO.Directory.CreateDirectory(Application.persistentDataPath + Constants.Path.LogDirectory);
147147

148-
LogSystem.Instance.InstallReactor(new FileReactor(Application.persistentDataPath + Constants.Path.LOG_FOLDER + "/" + Application.productName + ".log", logLevelFileReactor, logHistory));
148+
LogSystem.Instance.InstallReactor(new FileReactor(Application.persistentDataPath + Constants.Path.LogDirectory + "/" + Application.productName + ".log", logLevelFileReactor, logHistory));
149149

150150
Application.logMessageReceived += UnityLogCallback;
151151
}

0 commit comments

Comments
 (0)