Skip to content

Commit

Permalink
Fix XML documentation warnings in MRTK3, round 2 (#11719)
Browse files Browse the repository at this point in the history
Fixing XML documentation warnings in MRTK3. This is the second pass on fixing these warnings. Hopefully all warnings have been addressed with this change.
  • Loading branch information
AMollis authored Jul 20, 2023
1 parent d67b126 commit 95cce22
Show file tree
Hide file tree
Showing 149 changed files with 2,107 additions and 875 deletions.
17 changes: 17 additions & 0 deletions UnityProjects/MRTKDevTemplate/Assets/BuildAssets/BuildApp.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the Apache License.

// Disable "missing XML comment" warning for samples. While nice to have, this XML documentation is not required for samples.
#pragma warning disable CS1591

using System;
using System.IO;
using System.Linq;
Expand All @@ -10,6 +13,9 @@

namespace Microsoft.MixedReality.Toolkit.Examples.Build
{
/// <summary>
/// A static class that provides functions for compiling the example scenes via command line.
/// </summary>
public static class BuildApp
{
private static string[] scenes = {
Expand Down Expand Up @@ -49,6 +55,9 @@ public static class BuildApp

private static string buildPath = "build";

/// <summary>
/// Build the Unity project's example scenes.
/// </summary>
public static void StartCommandLineBuild()
{
ParseBuildCommandLine();
Expand Down Expand Up @@ -82,6 +91,13 @@ public static void StartCommandLineBuild()
EditorApplication.Exit(success ? 0 : 1);
}

/// <summary>
/// Ensure that the Text Mesh Pro assets are included in the Unity project.
/// </summary>
/// <remarks>
/// This is currently not functioning correctly. When running via command line,
/// the assets are imported, but are not available in the built application.
/// </remarks>
public static void EnsureTMPro()
{
string assetsFullPath = Path.GetFullPath("Assets/TextMesh Pro");
Expand Down Expand Up @@ -129,3 +145,4 @@ private static string[] SplitSceneList(string sceneList)
}
}
}
#pragma warning restore CS1591
Original file line number Diff line number Diff line change
Expand Up @@ -1144,7 +1144,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
dataSourceType: themeFetcher
keyPathMapper: {fileID: 0}
url: http://TryMRTK.com/api/data
url:
secondsBetweenFetches: 1
themeSelector: {fileID: 297520969}
--- !u!114 &297520967
Expand Down Expand Up @@ -2662,7 +2662,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
dataSourceType: data
keyPathMapper: {fileID: 0}
url: http://TryMRTK.com/nature-photos/photo_data.json
url:
secondsBetweenFetches: 60
--- !u!4 &874612861
Transform:
Expand Down Expand Up @@ -3930,7 +3930,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
dataSourceType: data
keyPathMapper: {fileID: 0}
url: http://TryMRTK.com/api/random_joke
url:
secondsBetweenFetches: 15
--- !u!114 &1322284030
MonoBehaviour:
Expand Down Expand Up @@ -7158,7 +7158,7 @@ MonoBehaviour:
dataSourceType: data
_staticCollectionSize: 20
_fluxCollectionSize: 20
imageUrlTemplate: http://TryMRTK.com/nature-photos/images/{0:D4}.jpg
imageUrlTemplate:
--- !u!4 &1987298545
Transform:
m_ObjectHideFlags: 0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
// Licensed under the MIT License.

// Disable "missing XML comment" warning for samples. While nice to have, this XML documentation is not required for samples.
#pragma warning disable CS1591

using System.Collections.Generic;
using UnityEngine;

namespace Microsoft.MixedReality.Toolkit.Data
{
/// <summary>
/// Test DataController that logs a message event to the console
/// Test <see cref="IDataController"/> that logs a message event to the console.
/// </summary>
[AddComponentMenu("MRTK/Examples/Data Binding/Data Controller Test")]
public class DataControllerTest : DataControllerGOBase
Expand Down Expand Up @@ -68,3 +71,4 @@ public override void ProcessCommand(string command, object data, Dictionary<stri
}
}
}
#pragma warning restore CS1591
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

// Disable "missing XML comment" warning for samples. While nice to have, this XML documentation is not required for samples.
#pragma warning disable CS1591

using UnityEngine;

namespace Microsoft.MixedReality.Toolkit.Data
Expand All @@ -9,7 +12,7 @@ namespace Microsoft.MixedReality.Toolkit.Data
/// Simple test data source that programmatically changes variables in a data source.
/// </summary>
/// <remarks>
/// Using a simple <key,value> store, it's possible to separate data from view
/// Using a simple key-value store, it's possible to separate data from view
/// to simplify the integration of generic view prefabs that are populated from
/// external information.
/// </remarks>
Expand All @@ -22,3 +25,4 @@ public override IDataSource AllocateDataSource()
}
}
}
#pragma warning restore CS1591
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

// Disable "missing XML comment" warning for samples. While nice to have, this XML documentation is not required for samples.
#pragma warning disable CS1591

using UnityEngine;

namespace Microsoft.MixedReality.Toolkit.Data
{
/// <summary>
/// Simple data source that generates a large list of randomly generated entries.
/// This can be used to test paging and virtualization.
/// </summary>
/// <remarks>
/// This can be used to test paging and virtualization.
/// </remarks>
[AddComponentMenu("MRTK/Examples/Data Binding/Data Source Dynamic List")]
public class DataSourceDynamicList : DataSourceGOBase
{
Expand Down Expand Up @@ -128,3 +133,4 @@ protected void InitializeDataSourceStatic()
}
}
}
#pragma warning restore CS1591
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

// Disable "missing XML comment" warning for samples. While nice to have, this XML documentation is not required for samples.
#pragma warning disable CS1591

using UnityEngine;

namespace Microsoft.MixedReality.Toolkit.Data
Expand All @@ -10,7 +13,7 @@ namespace Microsoft.MixedReality.Toolkit.Data
/// its reported content, in this case an image that populates a sprite.
/// </summary>
/// <remarks>
/// Using a simple <key,value> store, it's possible to separate data from view
/// Using a simple key-value store, it's possible to separate data from view
/// to simplify the integration of generic view prefabs that are populated from
/// external information.
/// </remarks>
Expand Down Expand Up @@ -59,3 +62,4 @@ private void Update()
}
}
}
#pragma warning restore CS1591
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

// Disable "missing XML comment" warning for samples. While nice to have, this XML documentation is not required for samples.
#pragma warning disable CS1591

using UnityEngine;

namespace Microsoft.MixedReality.Toolkit.Data
{
/// <summary>
/// A simple data source that fetches JSON data from a specified URL every N seconds.
///
/// A simple data source that fetches JSON data from a specified URL at a specified rate.
/// </summary>
/// <remarks>
/// This will trigger notification changes by the base class once the data has been
/// parsed.
/// </summary>
/// </remarks>
[AddComponentMenu("MRTK/Examples/Data Binding/Data Source Json Test")]
public class DataSourceJsonTest : DataSourceGOJson
{
Expand Down Expand Up @@ -45,3 +49,4 @@ private void Update()
}
}
}
#pragma warning restore CS1591
Original file line number Diff line number Diff line change
@@ -1,25 +1,29 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

// Disable "missing XML comment" warning for samples. While nice to have, this XML documentation is not required for samples.
#pragma warning disable CS1591

using System;
using UnityEngine;

namespace Microsoft.MixedReality.Toolkit.Data
{
/// <summary>
/// A simple data source that fetches JSON data from a specified URL every N seconds.
///
/// A simple data source that fetches JSON data from a specified URL at a specified rate.
/// </summary>
/// <remarks>
/// <para>
/// This will trigger notification changes by the base class once the data has been
/// parsed.
///
/// Note: The theme can be changed by pressing theme buttons at http://TryMRTK.com
/// </summary>
/// </para>
/// </remarks>
[AddComponentMenu("MRTK/Examples/Data Binding/Data Source Json Theme Test")]
public class DataSourceJsonThemeTest : DataSourceGOJson
{
[Tooltip("URL for a json data source")]
[SerializeField]
private string url = "http://TryMRTK.com/api/data";
private string url = string.Empty;

[Tooltip("How many seconds between fetching the data source and notifying all consumer of changes.")]
[SerializeField]
Expand Down Expand Up @@ -54,7 +58,7 @@ private void Update()
{
_time += Time.deltaTime;

if (_time >= secondsBetweenFetches)
if (_time >= secondsBetweenFetches && !string.IsNullOrEmpty(url))
{
_time -= secondsBetweenFetches;

Expand All @@ -63,3 +67,4 @@ private void Update()
}
}
}
#pragma warning restore CS1591
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

// Disable "missing XML comment" warning for samples. While nice to have, this XML documentation is not required for samples.
#pragma warning disable CS1591

using System.Collections.ObjectModel;
using UnityEngine;

Expand All @@ -10,7 +13,7 @@ namespace Microsoft.MixedReality.Toolkit.Data
/// Simple test data source that programmatically changes variables in a data source.
/// </summary>
/// <remarks>
/// Using a simple <key,value> store, it's possible to separate data from view
/// Using a simple key-value store, it's possible to separate data from view
/// to simplify the integration of generic view prefabs that are populated from
/// external information.
/// </remarks>
Expand Down Expand Up @@ -200,3 +203,4 @@ protected void Randomize(string[] items)
}
}
}
#pragma warning restore CS1591
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

// Disable "missing XML comment" warning for samples. While nice to have, this XML documentation is not required for samples.
#pragma warning disable CS1591

using UnityEngine;

namespace Microsoft.MixedReality.Toolkit.Data
Expand All @@ -9,7 +12,7 @@ namespace Microsoft.MixedReality.Toolkit.Data
/// Simple test data source that programmatically changes variables in a data source.
/// </summary>
/// <remarks>
/// Using a simple <key,value> store, it's possible to separate data from view
/// Using a simple key-value store, it's possible to separate data from view
/// to simplify the integration of generic view prefabs that are populated from
/// external information.
/// </remarks>
Expand Down Expand Up @@ -49,3 +52,4 @@ public override IDataSource AllocateDataSource()
}
}
}
#pragma warning restore CS1591
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

// Disable "missing XML comment" warning for samples. While nice to have, this XML documentation is not required for samples.
#pragma warning disable CS1591

using UnityEngine;

namespace Microsoft.MixedReality.Toolkit.Data
Expand All @@ -9,7 +12,7 @@ namespace Microsoft.MixedReality.Toolkit.Data
/// Simple test data source that programmatically changes variables in a data source.
/// </summary>
/// <remarks>
/// Using a simple <key,value> store, it's possible to separate data from view
/// Using a simple key-value store, it's possible to separate data from view
/// to simplify the integration of generic view prefabs that are populated from
/// external information.
/// </remarks>
Expand Down Expand Up @@ -117,3 +120,4 @@ private void InitializeData()
}
}
}
#pragma warning restore CS1591
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

// Disable "missing XML comment" warning for samples. While nice to have, this XML documentation is not required for samples.
#pragma warning disable CS1591

using System;
using UnityEngine;

Expand Down Expand Up @@ -49,7 +52,7 @@ public void NextTheme()
}

/// <summary>
/// A Unity Editor-only event function that is called when the script is loaded or a value changes in the Unity Inspector.
/// A Unity Editor only event function that is called when the script is loaded or a value changes in the Unity Inspector.
/// </summary>
private void OnValidate()
{
Expand Down Expand Up @@ -86,3 +89,4 @@ public override IDataSource AllocateDataSource()
}
}
}
#pragma warning restore CS1591
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

// Disable "missing XML comment" warning for samples. While nice to have, this XML documentation is not required for samples.
#pragma warning disable CS1591

using System;
using UnityEngine;
using UnityEngine.Serialization;
Expand Down Expand Up @@ -203,3 +206,4 @@ public SlateParameters SlateStyle
}
}
}
#pragma warning restore CS1591
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

// Disable "missing XML comment" warning for samples. While nice to have, this XML documentation is not required for samples.
#pragma warning disable CS1591

using UnityEngine;

namespace Microsoft.MixedReality.Toolkit.Data
Expand Down Expand Up @@ -57,3 +60,4 @@ public void UpdateThemeName()
}
}
}
#pragma warning restore CS1591
Loading

0 comments on commit 95cce22

Please sign in to comment.