Skip to content

Commit 0cdaf0f

Browse files
crtreasu-msftCraig Treasure
andauthored
AOA Conversion cleanup (Azure#25680)
While looking at the code to understand our error handling, I noticed that analyzers were suggesting periods at the end of sentences, which make sense. The analyzer added all of those for me. I've also fixed the formatting in `AssetConversionOperation.cs` which appears to have been tweaked by some automated tooling. Co-authored-by: Craig Treasure <crtreasu@microsoft.com>
1 parent a9925c9 commit 0cdaf0f

File tree

12 files changed

+131
-126
lines changed

12 files changed

+131
-126
lines changed

sdk/objectanchors/Azure.MixedReality.ObjectAnchors.Conversion/src/AssetConversionOperation.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace Azure.MixedReality.ObjectAnchors.Conversion
1313
{
1414
/// <summary>
15-
/// A long running asset conversion process for Object Anchors
15+
/// A long running asset conversion process for Object Anchors.
1616
/// </summary>
1717
public class AssetConversionOperation : Operation<AssetConversionProperties>
1818
{
@@ -61,7 +61,7 @@ public override AssetConversionProperties Value
6161
public override bool HasValue => _lastConversionResponse != null;
6262

6363
/// <summary>
64-
/// Whether the operation has completed and has a successful final status
64+
/// Whether the operation has completed and has a successful final status.
6565
/// </summary>
6666
public bool HasCompletedSuccessfully => HasCompleted && HasValue && (this.Value.ConversionStatus == AssetConversionStatus.Succeeded);
6767

sdk/objectanchors/Azure.MixedReality.ObjectAnchors.Conversion/src/AssetFileType.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
namespace Azure.MixedReality.ObjectAnchors.Conversion
99
{
1010
/// <summary>
11-
/// An extensible enum representing the filetype of the asset
11+
/// An extensible enum representing the filetype of the asset.
1212
/// </summary>
1313
public readonly struct AssetFileType : IEquatable<AssetFileType>
1414
{
@@ -22,44 +22,44 @@ namespace Azure.MixedReality.ObjectAnchors.Conversion
2222
/// <summary>
2323
/// Initializes a new instance of the <see cref="AssetFileType"/> struct.
2424
/// </summary>
25-
/// <param name="value">The asset file type</param>
25+
/// <param name="value">The asset file type.</param>
2626
public AssetFileType(string value)
2727
{
2828
_value = value ?? throw new ArgumentNullException(nameof(value));
2929
}
3030

3131
/// <summary>
32-
/// Returns an AssetFileType derived from the extension of a provided file name
32+
/// Returns an AssetFileType derived from the extension of a provided file name.
3333
/// </summary>
34-
/// <param name="assetFilePath">The asset file name</param>
35-
/// <returns>The AssetFileType derived from the extension of a provided file name</returns>
34+
/// <param name="assetFilePath">The asset file name.</param>
35+
/// <returns>The AssetFileType derived from the extension of a provided file name.</returns>
3636
public static AssetFileType FromFilePath(string assetFilePath)
3737
{
3838
return new AssetFileType(Path.GetExtension(assetFilePath));
3939
}
4040

4141
/// <summary>
42-
/// Fbx
42+
/// The FBX asset file type.
4343
/// </summary>
4444
public static AssetFileType Fbx { get; } = new AssetFileType(FbxValue);
4545

4646
/// <summary>
47-
/// Glb
47+
/// The GLB asset file type.
4848
/// </summary>
4949
public static AssetFileType Glb { get; } = new AssetFileType(GlbValue);
5050

5151
/// <summary>
52-
/// Gltf
52+
/// The GLTF asset file type.
5353
/// </summary>
5454
public static AssetFileType Gltf { get; } = new AssetFileType(GltfValue);
5555

5656
/// <summary>
57-
/// Obj
57+
/// The OBJ asset file type.
5858
/// </summary>
5959
public static AssetFileType Obj { get; } = new AssetFileType(ObjValue);
6060

6161
/// <summary>
62-
/// Ply
62+
/// The PLY asset file type.
6363
/// </summary>
6464
public static AssetFileType Ply { get; } = new AssetFileType(PlyValue);
6565

sdk/objectanchors/Azure.MixedReality.ObjectAnchors.Conversion/src/AssetFileTypeNotSupportedException.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,32 +9,32 @@
99
namespace Azure.MixedReality.ObjectAnchors.Conversion
1010
{
1111
/// <summary>
12-
/// An Exception thrown during an attempt to provide an unsupported asset file type in an asset conversion operation
12+
/// An Exception thrown during an attempt to provide an unsupported asset file type in an asset conversion operation.
1313
/// </summary>
1414
public class AssetFileTypeNotSupportedException : Exception, ISerializable
1515
{
1616
/// <summary>
17-
/// Creates an instance of the <see cref="AssetFileTypeNotSupportedException"/>
17+
/// Creates an instance of the <see cref="AssetFileTypeNotSupportedException"/>.
1818
/// </summary>
1919
public AssetFileTypeNotSupportedException()
2020
: base($"The provided asset file type is unsupported by Azure Object Anchors for conversion.")
2121
{
2222
}
2323

2424
/// <summary>
25-
/// Creates an instance of the <see cref="AssetFileTypeNotSupportedException"/>
25+
/// Creates an instance of the <see cref="AssetFileTypeNotSupportedException"/>.
2626
/// </summary>
27-
/// <param name="message">The message corresponding to the exception</param>
27+
/// <param name="message">The message corresponding to the exception.</param>
2828
public AssetFileTypeNotSupportedException(string message)
2929
: base(message)
3030
{
3131
}
3232

3333
/// <summary>
34-
/// Creates an Exception thrown during an attempt to provide an unsupported asset file type in an asset conversion operation
34+
/// Creates an Exception thrown during an attempt to provide an unsupported asset file type in an asset conversion operation.
3535
/// </summary>
36-
/// <param name="message">The message corresponding to the exception</param>
37-
/// <param name="inner">The inner exception</param>
36+
/// <param name="message">The message corresponding to the exception.</param>
37+
/// <param name="inner">The inner exception.</param>
3838
public AssetFileTypeNotSupportedException(string message, Exception inner)
3939
: base(message, inner)
4040
{
@@ -59,10 +59,10 @@ internal AssetFileTypeNotSupportedException(AssetFileType assetFileType, IReadOn
5959
}
6060

6161
/// <summary>
62-
/// An Exception thrown during an attempt to provide an unsupported asset file type in an asset conversion operation
62+
/// An Exception thrown during an attempt to provide an unsupported asset file type in an asset conversion operation.
6363
/// </summary>
64-
/// <param name="info">The SerializationInfo</param>
65-
/// <param name="context">The StreamingContext</param>
64+
/// <param name="info">The <see cref="SerializationInfo"/>.</param>
65+
/// <param name="context">The <see cref="StreamingContext"/>.</param>
6666
protected AssetFileTypeNotSupportedException(SerializationInfo info, StreamingContext context)
6767
: base(info, context)
6868
{
@@ -71,12 +71,12 @@ protected AssetFileTypeNotSupportedException(SerializationInfo info, StreamingCo
7171
}
7272

7373
/// <summary>
74-
/// The unsupported filetype provided for asset conversion
74+
/// The unsupported filetype provided for asset conversion.
7575
/// </summary>
7676
public AssetFileType AttemptedFileType { get; }
7777

7878
/// <summary>
79-
/// The list of file types supported by Azure Object Anchors Conversion
79+
/// The list of file types supported by Azure Object Anchors Conversion.
8080
/// </summary>
8181
public IReadOnlyList<AssetFileType> SupportedAssetFileTypes { get; }
8282
}

sdk/objectanchors/Azure.MixedReality.ObjectAnchors.Conversion/src/Customizations/Models/AssetConversionConfiguration.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace Azure.MixedReality.ObjectAnchors.Conversion
1515
public partial class AssetConversionConfiguration
1616
{
1717
/// <summary>
18-
/// Creates an asset conversion configuration from the gravity vector and a model scale
18+
/// Creates an asset conversion configuration from the gravity vector and a model scale.
1919
/// </summary>
2020
/// <param name="gravity">Gravity vector with respect to object's nominal position.</param>
2121
/// <param name="scale">Scale of transformation of asset units into meter space.</param>
@@ -29,7 +29,7 @@ internal AssetConversionConfiguration(System.Numerics.Vector3 gravity, float sca
2929
}
3030

3131
/// <summary>
32-
/// Creates an asset conversion configuration from the gravity vector and a model scale
32+
/// Creates an asset conversion configuration from the gravity vector and a model scale.
3333
/// </summary>
3434
/// <param name="gravityWrapper">Gravity vector with respect to object's nominal position.</param>
3535
/// <param name="scale">Scale of transformation of asset units into meter space.</param>

sdk/objectanchors/Azure.MixedReality.ObjectAnchors.Conversion/src/Customizations/Models/AssetConversionProperties.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,19 @@ internal set
4646
}
4747

4848
/// <summary>
49-
/// The status of the AOA asset conversion job
49+
/// The status of the AOA asset conversion job.
5050
/// </summary>
5151
[CodeGenMember("JobStatus")]
5252
public AssetConversionStatus? ConversionStatus { get; internal set; }
5353

5454
/// <summary>
55-
/// The configuration of the AOA asset conversion job
55+
/// The configuration of the AOA asset conversion job.
5656
/// </summary>
5757
[CodeGenMember("IngestionConfiguration")]
5858
public AssetConversionConfiguration ConversionConfiguration { get; internal set; }
5959

6060
/// <summary>
61-
/// The error code of the AOA asset conversion job
61+
/// The error code of the AOA asset conversion job.
6262
/// </summary>
6363
public ConversionErrorCode ErrorCode { get; }
6464

sdk/objectanchors/Azure.MixedReality.ObjectAnchors.Conversion/src/Customizations/Models/Quaternion.cs

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -14,70 +14,70 @@ internal partial class Quaternion : IEquatable<Quaternion>
1414
private System.Numerics.Quaternion data;
1515

1616
/// <summary>
17-
/// Creates a autorest-defined Quaternion given its Numerics equivalent
17+
/// Creates a autorest-defined Quaternion given its Numerics equivalent.
1818
/// </summary>
19-
/// <param name="quaternion">The numerics quaternion</param>
19+
/// <param name="quaternion">The numerics quaternion.</param>
2020
internal Quaternion(System.Numerics.Quaternion quaternion)
2121
{
2222
data = quaternion;
2323
}
2424

2525
/// <summary>
26-
/// Creates a autorest-defined Quaternion given its fields
26+
/// Creates a autorest-defined Quaternion given its fields.
2727
/// </summary>
28-
/// <param name="x">X component</param>
29-
/// <param name="y">Y component</param>
30-
/// <param name="z">Z component</param>
31-
/// <param name="w">W component</param>
32-
/// <param name="isIdentity">Unused</param>
28+
/// <param name="x">X component.</param>
29+
/// <param name="y">Y component.</param>
30+
/// <param name="z">Z component.</param>
31+
/// <param name="w">W component.</param>
32+
/// <param name="isIdentity">Unused.</param>
3333
#pragma warning disable CA1801 // Review unused parameters
3434
internal Quaternion(float x, float y, float z, float w, bool isIdentity) : this(x, y, z, w)
3535
#pragma warning restore CA1801 // Review unused parameters
3636
{
3737
}
3838

3939
/// <summary>
40-
/// Creates a autorest-defined Quaternion given its fields
40+
/// Creates a autorest-defined Quaternion given its fields.
4141
/// </summary>
42-
/// <param name="x">X component</param>
43-
/// <param name="y">Y component</param>
44-
/// <param name="z">Z component</param>
45-
/// <param name="w">W component</param>
42+
/// <param name="x">X component.</param>
43+
/// <param name="y">Y component.</param>
44+
/// <param name="z">Z component.</param>
45+
/// <param name="w">W component.</param>
4646
internal Quaternion(float x, float y, float z, float w)
4747
{
4848
data = new System.Numerics.Quaternion(x, y, z, w);
4949
}
5050

5151
/// <summary>
52-
/// X component
52+
/// X component.
5353
/// </summary>
5454
public float X { get { return data.X; } set { data.X = value; } }
5555

5656
/// <summary>
57-
/// Y component
57+
/// Y component.
5858
/// </summary>
5959
public float Y { get { return data.Y; } set { data.Y = value; } }
6060

6161
/// <summary>
62-
/// Z component
62+
/// Z component.
6363
/// </summary>
6464
public float Z { get { return data.Z; } set { data.Z = value; } }
6565

6666
/// <summary>
67-
/// W component
67+
/// W component.
6868
/// </summary>
6969
public float W { get { return data.W; } set { data.W = value; } }
7070

7171
/// <summary>
72-
/// Gets a value that indicates whether the current instance is the identity quaternion
72+
/// Gets a value that indicates whether the current instance is the identity quaternion.
7373
/// </summary>
7474
public bool IsIdentity { get => data.IsIdentity; }
7575

7676
/// <summary>
77-
/// Assesses equality with another quaternion
77+
/// Assesses equality with another quaternion.
7878
/// </summary>
79-
/// <param name="other">The other quaternion being compared to</param>
80-
/// <returns>Whether the two are equal</returns>
79+
/// <param name="other">The other quaternion being compared to.</param>
80+
/// <returns>Whether the two are equal.</returns>
8181
public bool Equals(Quaternion other)
8282
{
8383
return this.data.Equals(other.data);

sdk/objectanchors/Azure.MixedReality.ObjectAnchors.Conversion/src/Customizations/Models/TrajectoryPose.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,20 @@ namespace Azure.MixedReality.ObjectAnchors.Conversion
1515
public partial struct TrajectoryPose : IEquatable<TrajectoryPose>
1616
{
1717
/// <summary>
18-
/// Creates the Pose of a trajectory
18+
/// Creates the Pose of a trajectory.
1919
/// </summary>
20-
/// <param name="rotation">The pose's rotation</param>
21-
/// <param name="translation">The pose's translation</param>
20+
/// <param name="rotation">The pose's rotation.</param>
21+
/// <param name="translation">The pose's translation.</param>
2222
internal TrajectoryPose(System.Numerics.Quaternion rotation, System.Numerics.Vector3 translation)
2323
: this(new Quaternion(rotation), new Vector3(translation))
2424
{
2525
}
2626

2727
/// <summary>
28-
/// Creates the Pose of a trajectory
28+
/// Creates the Pose of a trajectory.
2929
/// </summary>
30-
/// <param name="rotationWrapper">The pose's rotation</param>
31-
/// <param name="translationWrapper">The pose's translation</param>
30+
/// <param name="rotationWrapper">The pose's rotation.</param>
31+
/// <param name="translationWrapper">The pose's translation.</param>
3232
internal TrajectoryPose(Quaternion rotationWrapper, Vector3 translationWrapper)
3333
{
3434
RotationWrapper = rotationWrapper;
@@ -52,7 +52,7 @@ internal TrajectoryPose(Quaternion rotationWrapper, Vector3 translationWrapper)
5252
internal readonly Vector3 TranslationWrapper;
5353

5454
/// <summary>
55-
/// Returns whether a Trajectory pose's content matches that of another
55+
/// Returns whether a Trajectory pose's content matches that of another.
5656
/// </summary>
5757
public bool Equals(TrajectoryPose other)
5858
{

sdk/objectanchors/Azure.MixedReality.ObjectAnchors.Conversion/src/Customizations/Models/Vector3.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,45 +14,45 @@ internal partial class Vector3 : IEquatable<Vector3>
1414
private System.Numerics.Vector3 data;
1515

1616
/// <summary>
17-
/// Creates a autorest-defined Vector3 given its Numerics equivalent
17+
/// Creates a autorest-defined Vector3 given its Numerics equivalent.
1818
/// </summary>
19-
/// <param name="vector">The numerics vector</param>
19+
/// <param name="vector">The numerics vector.</param>
2020
internal Vector3(System.Numerics.Vector3 vector)
2121
{
2222
data = vector;
2323
}
2424

2525
/// <summary>
26-
/// Creates a autorest-defined Vector3 given its fields
26+
/// Creates a autorest-defined Vector3 given its fields.
2727
/// </summary>
28-
/// <param name="x">X component</param>
29-
/// <param name="y">Y component</param>
30-
/// <param name="z">Z component</param>
28+
/// <param name="x">X component.</param>
29+
/// <param name="y">Y component.</param>
30+
/// <param name="z">Z component.</param>
3131
internal Vector3(float x, float y, float z)
3232
{
3333
data = new System.Numerics.Vector3(x, y, z);
3434
}
3535

3636
/// <summary>
37-
/// X component
37+
/// X component.
3838
/// </summary>
3939
public float X { get { return data.X; } set { data.X = value; } }
4040

4141
/// <summary>
42-
/// Y component
42+
/// Y component.
4343
/// </summary>
4444
public float Y { get { return data.Y; } set { data.Y = value; } }
4545

4646
/// <summary>
47-
/// Z component
47+
/// Z component.
4848
/// </summary>
4949
public float Z { get { return data.Z; } set { data.Z = value; } }
5050

5151
/// <summary>
52-
/// Assesses equality with another vector
52+
/// Assesses equality with another vector.
5353
/// </summary>
54-
/// <param name="other">The other vector being compared to</param>
55-
/// <returns>Whether the two are equal</returns>
54+
/// <param name="other">The other vector being compared to.</param>
55+
/// <returns>Whether the two are equal.</returns>
5656
public bool Equals(Vector3 other)
5757
{
5858
return this.data.Equals(other.data);

0 commit comments

Comments
 (0)