Skip to content

Commit c1c9943

Browse files
Create real documentation
1 parent 52a82af commit c1c9943

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+3263
-369
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
html/

CoroutineHost.cs

+18-13
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,26 @@
1-
21
using System;
32

4-
public class CoroutineHost : MonoSingleton<CoroutineHost>
3+
namespace Meteor.Internal
54
{
6-
public CoroutineHost ()
5+
/// <summary>
6+
/// An object used to host the internal coroutines for running the Meteor services.
7+
/// </summary>
8+
public class CoroutineHost : MonoSingleton<CoroutineHost>
79
{
8-
}
10+
public CoroutineHost ()
11+
{
12+
}
913

10-
protected override void OnApplicationQuit ()
11-
{
12-
base.OnApplicationQuit ();
13-
try {
14-
Meteor.LiveData.Instance.Close ();
15-
#pragma warning disable 0168
16-
} catch (Exception e) {
14+
protected override void OnApplicationQuit ()
15+
{
16+
base.OnApplicationQuit ();
17+
try {
18+
Meteor.Internal.LiveData.Instance.Close ();
19+
#pragma warning disable 0168
20+
} catch (Exception e) {
21+
}
22+
#pragma warning restore 0168
1723
}
18-
#pragma warning restore 0168
1924
}
20-
}
2125

26+
}

Doxyfile

+2,412
Large diffs are not rendered by default.

Error.cs

+30-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,22 @@
11
namespace Meteor
22
{
3+
/// <summary>
4+
/// A Meteor error.
5+
/// </summary>
36
[System.Serializable]
47
public class Error
58
{
9+
/// <summary>
10+
/// The reason for the error. Corresponds to the second argument of your <code>new Meteor.Error</code> call in your Meteor code.
11+
/// </summary>
612
public string reason;
13+
/// <summary>
14+
/// The error code. Corresponds to the first argument of your <code>new Meteor.Error</code> call in your Meteor code.
15+
/// </summary>
716
public int error;
17+
/// <summary>
18+
/// The error details. Corresponds to the third and last argument of your <code>new Meteor.Error</code> call in your Meteor code.
19+
/// </summary>
820
public string details;
921

1022
public Error ()
@@ -18,11 +30,22 @@ bool IsNull ()
1830
&& string.IsNullOrEmpty (details);
1931
}
2032

33+
/// <summary>
34+
/// Serves as a hash function for a <see cref="Meteor.Error"/> object. This is defined as the error code in order to facilitate better comparisons.
35+
/// </summary>
36+
/// <returns>A hash code for this instance that is suitable for use in hashing algorithms and data structures such as a hash table.</returns>
2137
public override int GetHashCode ()
2238
{
23-
return base.GetHashCode ();
39+
return error;
2440
}
2541

42+
/// <summary>
43+
/// Determines whether the specified <see cref="System.Object"/> is equal to the current <see cref="Meteor.Error"/>. If both objects are errors,
44+
/// their reason and error codes will be compared instead of the instances.
45+
/// </summary>
46+
/// <param name="obj">The <see cref="System.Object"/> to compare with the current <see cref="Meteor.Error"/>.</param>
47+
/// <returns><c>true</c> if the specified <see cref="System.Object"/> is equal to the current <see cref="Meteor.Error"/>;
48+
/// otherwise, <c>false</c>.</returns>
2649
public override bool Equals (object obj)
2750
{
2851
if (obj == null) {
@@ -35,6 +58,9 @@ public override bool Equals (object obj)
3558
&& error == other.error;
3659
}
3760

61+
/// <summary>
62+
/// Compares two error objects to see if their reasons and error codes are equal.
63+
/// </summary>
3864
public static bool operator == (Error a, Error b)
3965
{
4066
var isNullA = (object)a == null || a.IsNull ();
@@ -45,6 +71,9 @@ public override bool Equals (object obj)
4571
return nullComparison || (isNullA ? b.Equals (a) : a.Equals (b));
4672
}
4773

74+
/// <summary>
75+
/// Compares two error objects to see if their reasons and error codes are not equal.
76+
/// </summary>
4877
public static bool operator != (Error a, Error b)
4978
{
5079
return !(a == b);

0 commit comments

Comments
 (0)