From c0e2f85eaebbd7d5338d6b281cb23dfa4f277da7 Mon Sep 17 00:00:00 2001 From: "SND\\AstrorEnales_cp" Date: Wed, 10 Oct 2012 16:07:28 +0000 Subject: [PATCH] Added a lot of Developer attributes and added some colors to the OnlineStatusGenerator --- .../ContentPipeline/Helper/Nullable.cs | 5 - .../Strukturen/Design/TypeConverterTest.cs | 147 ++++++++++-------- .../GamerServices/AvatarAnimationPreset.cs | 3 + ANX.Framework/GamerServices/AvatarBodyType.cs | 3 + ANX.Framework/GamerServices/AvatarBone.cs | 4 + ANX.Framework/GamerServices/AvatarEye.cs | 3 + ANX.Framework/GamerServices/AvatarEyebrow.cs | 3 + ANX.Framework/GamerServices/AvatarMouth.cs | 3 + .../GamerServices/AvatarRendererState.cs | 3 + .../GamerServices/ControllerSensitivity.cs | 3 + ANX.Framework/GamerServices/GameDifficulty.cs | 3 + ANX.Framework/GamerServices/GamerPresence.cs | 37 ++--- .../GamerServices/GamerPresenceMode.cs | 3 + .../GamerServices/GamerPrivilegeSetting.cs | 3 + ANX.Framework/GamerServices/GamerZone.cs | 3 + .../GamerServices/InviteAcceptedEventArgs.cs | 16 +- ANX.Framework/GamerServices/LeaderboardKey.cs | 3 + .../GamerServices/LeaderboardOutcome.cs | 3 + ANX.Framework/GamerServices/MessageBoxIcon.cs | 3 + .../GamerServices/NotificationPosition.cs | 3 + .../GamerServices/RacingCameraAngle.cs | 3 + .../GamerServices/SignedInEventArgs.cs | 10 +- .../GamerServices/SignedOutEventArgs.cs | 9 +- ANX.Framework/Input/ButtonState.cs | 4 + ANX.Framework/Input/Buttons.cs | 3 + ANX.Framework/Input/GamePadDeadZone.cs | 4 + ANX.Framework/Input/GamePadType.cs | 4 + ANX.Framework/Input/KeyState.cs | 4 + ANX.Framework/Input/Keys.cs | 4 + ANX.Framework/Input/Touch/GestureSample.cs | 75 ++++----- ANX.Framework/Input/Touch/GestureType.cs | 3 + .../Input/Touch/TouchLocationState.cs | 4 + ANX.Framework/Net/AvailableNetworkSession.cs | 147 +++--------------- .../Net/AvailableNetworkSessionCollection.cs | 3 + ANX.Framework/Net/GameEndedEventArgs.cs | 9 +- ANX.Framework/Net/GameStartedEventArgs.cs | 9 +- ANX.Framework/Net/GamerJoinedEventArgs.cs | 23 ++- ANX.Framework/Net/GamerLeftEventArgs.cs | 23 ++- ANX.Framework/Net/HostChangedEventArgs.cs | 32 ++-- ANX.Framework/Net/LocalNetworkGamer.cs | 3 + ANX.Framework/Net/NetworkException.cs | 6 +- ANX.Framework/Net/NetworkGamer.cs | 3 + ANX.Framework/Net/NetworkMachine.cs | 3 + ANX.Framework/Net/NetworkSession.cs | 58 ++++--- ANX.Framework/Net/NetworkSessionEndReason.cs | 3 + .../Net/NetworkSessionEndedEventArgs.cs | 23 ++- ANX.Framework/Net/NetworkSessionJoinError.cs | 3 + .../Net/NetworkSessionJoinException.cs | 3 + ANX.Framework/Net/NetworkSessionProperties.cs | 3 + ANX.Framework/Net/NetworkSessionState.cs | 3 + ANX.Framework/Net/NetworkSessionType.cs | 3 + ANX.Framework/Net/PacketReader.cs | 42 ++--- ANX.Framework/Net/PacketWriter.cs | 42 ++--- ANX.Framework/Net/QualityOfService.cs | 43 ++--- ANX.Framework/Net/SendDataOptions.cs | 3 + .../Net/WriteLeaderboardsEventArgs.cs | 16 +- Tools/OnlineStatusGenerator/Program.cs | 57 +++++-- 57 files changed, 450 insertions(+), 494 deletions(-) diff --git a/ANX.Framework.TestCenter/ContentPipeline/Helper/Nullable.cs b/ANX.Framework.TestCenter/ContentPipeline/Helper/Nullable.cs index e468dc1f..f8306451 100644 --- a/ANX.Framework.TestCenter/ContentPipeline/Helper/Nullable.cs +++ b/ANX.Framework.TestCenter/ContentPipeline/Helper/Nullable.cs @@ -1,10 +1,5 @@ #region Using Statements using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Microsoft.Xna.Framework.Content; -using Microsoft.Xna.Framework.Content.Pipeline.Serialization; using Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler; #endregion // Using Statements diff --git a/ANX.Framework.TestCenter/Strukturen/Design/TypeConverterTest.cs b/ANX.Framework.TestCenter/Strukturen/Design/TypeConverterTest.cs index 710d03ef..4c96dbd6 100644 --- a/ANX.Framework.TestCenter/Strukturen/Design/TypeConverterTest.cs +++ b/ANX.Framework.TestCenter/Strukturen/Design/TypeConverterTest.cs @@ -1,9 +1,5 @@ #region Using Statements using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.ComponentModel; using NUnit.Framework; #endregion // Using Statements @@ -12,9 +8,47 @@ using NUnit.Framework; // "ANX.Framework developer group" and released under the Ms-PL license. // For details see: http://anxframework.codeplex.com/license +#region Datatype Usings +using XnaVector2 = Microsoft.Xna.Framework.Vector2; +using AnxVector2 = ANX.Framework.Vector2; + using XnaVector3 = Microsoft.Xna.Framework.Vector3; using AnxVector3 = ANX.Framework.Vector3; +using XnaVector4 = Microsoft.Xna.Framework.Vector4; +using AnxVector4 = ANX.Framework.Vector4; + +using XnaQuaternion = Microsoft.Xna.Framework.Quaternion; +using AnxQuaternion = ANX.Framework.Quaternion; + +using XnaMatrix = Microsoft.Xna.Framework.Matrix; +using AnxMatrix = ANX.Framework.Matrix; + +using XnaRectangle = Microsoft.Xna.Framework.Rectangle; +using AnxRectangle = ANX.Framework.Rectangle; + +using XnaRay = Microsoft.Xna.Framework.Ray; +using AnxRay = ANX.Framework.Ray; + +using XnaPoint = Microsoft.Xna.Framework.Point; +using AnxPoint = ANX.Framework.Point; + +using XnaPlane = Microsoft.Xna.Framework.Plane; +using AnxPlane = ANX.Framework.Plane; + +using XnaBoundingBox = Microsoft.Xna.Framework.BoundingBox; +using AnxBoundingBox = ANX.Framework.BoundingBox; + +using XnaBoundingSphere = Microsoft.Xna.Framework.BoundingSphere; +using AnxBoundingSphere = ANX.Framework.BoundingSphere; + +using XnaBoundingFrustum = Microsoft.Xna.Framework.BoundingFrustum; +using AnxBoundingFrustum = ANX.Framework.BoundingFrustum; + +using XNADesign = Microsoft.Xna.Framework.Design; +using ANXDesign = ANX.Framework.Design; +#endregion + namespace ANX.Framework.TestCenter.Strukturen.Design { [TestFixture] @@ -23,11 +57,10 @@ namespace ANX.Framework.TestCenter.Strukturen.Design [Test] public void ConvertVector2Test() { - var xnaConverter = new Microsoft.Xna.Framework.Design.Vector2Converter(); - var anxConverter = new ANX.Framework.Design.Vector2Converter(); - - var xnaObject = new Microsoft.Xna.Framework.Vector2(1, 2); - var anxObject = new ANX.Framework.Vector2(1, 2); + var xnaConverter = new XNADesign.Vector2Converter(); + var anxConverter = new ANXDesign.Vector2Converter(); + var xnaObject = new XnaVector2(1, 2); + var anxObject = new AnxVector2(1, 2); Assert.AreEqual(xnaConverter.ConvertToString(xnaObject), anxConverter.ConvertToString(anxObject)); Assert.AreEqual(anxObject, anxConverter.ConvertFrom(xnaConverter.ConvertToString(xnaObject))); @@ -36,11 +69,10 @@ namespace ANX.Framework.TestCenter.Strukturen.Design [Test] public void ConvertVector3Test() { - var xnaConverter = new Microsoft.Xna.Framework.Design.Vector3Converter(); - var anxConverter = new ANX.Framework.Design.Vector3Converter(); - - var xnaObject = new Microsoft.Xna.Framework.Vector3(1, 2, 3); - var anxObject = new ANX.Framework.Vector3(1, 2, 3); + var xnaConverter = new XNADesign.Vector3Converter(); + var anxConverter = new ANXDesign.Vector3Converter(); + var xnaObject = new XnaVector3(1, 2, 3); + var anxObject = new AnxVector3(1, 2, 3); Assert.AreEqual(xnaConverter.ConvertToString(xnaObject), anxConverter.ConvertToString(anxObject)); Assert.AreEqual(anxObject, anxConverter.ConvertFrom(xnaConverter.ConvertToString(xnaObject))); @@ -49,11 +81,10 @@ namespace ANX.Framework.TestCenter.Strukturen.Design [Test] public void ConvertVector4Test() { - var xnaConverter = new Microsoft.Xna.Framework.Design.Vector4Converter(); - var anxConverter = new ANX.Framework.Design.Vector4Converter(); - - var xnaObject = new Microsoft.Xna.Framework.Vector4(1, 2, 3, 4); - var anxObject = new ANX.Framework.Vector4(1, 2, 3, 4); + var xnaConverter = new XNADesign.Vector4Converter(); + var anxConverter = new ANXDesign.Vector4Converter(); + var xnaObject = new XnaVector4(1, 2, 3, 4); + var anxObject = new AnxVector4(1, 2, 3, 4); Assert.AreEqual(xnaConverter.ConvertToString(xnaObject), anxConverter.ConvertToString(anxObject)); Assert.AreEqual(anxObject, anxConverter.ConvertFrom(xnaConverter.ConvertToString(xnaObject))); @@ -62,11 +93,10 @@ namespace ANX.Framework.TestCenter.Strukturen.Design [Test] public void ConvertQuaternionTest() { - var xnaConverter = new Microsoft.Xna.Framework.Design.QuaternionConverter(); - var anxConverter = new ANX.Framework.Design.QuaternionConverter(); - - var xnaObject = new Microsoft.Xna.Framework.Quaternion(1, 2, 3, 4); - var anxObject = new ANX.Framework.Quaternion(1, 2, 3, 4); + var xnaConverter = new XNADesign.QuaternionConverter(); + var anxConverter = new ANXDesign.QuaternionConverter(); + var xnaObject = new XnaQuaternion(1, 2, 3, 4); + var anxObject = new AnxQuaternion(1, 2, 3, 4); Assert.AreEqual(xnaConverter.ConvertToString(xnaObject), anxConverter.ConvertToString(anxObject)); Assert.AreEqual(anxObject, anxConverter.ConvertFrom(xnaConverter.ConvertToString(xnaObject))); @@ -75,11 +105,10 @@ namespace ANX.Framework.TestCenter.Strukturen.Design [Test] public void ConvertRectangleTest() { - var xnaConverter = new Microsoft.Xna.Framework.Design.RectangleConverter(); - var anxConverter = new ANX.Framework.Design.RectangleConverter(); - - var xnaObject = new Microsoft.Xna.Framework.Rectangle(1, 2, 3, 4); - var anxObject = new ANX.Framework.Rectangle(1, 2, 3, 4); + var xnaConverter = new XNADesign.RectangleConverter(); + var anxConverter = new ANXDesign.RectangleConverter(); + var xnaObject = new XnaRectangle(1, 2, 3, 4); + var anxObject = new AnxRectangle(1, 2, 3, 4); Assert.AreEqual(xnaConverter.ConvertToString(xnaObject), anxConverter.ConvertToString(anxObject)); // rectangle cannot convert from string @@ -88,11 +117,10 @@ namespace ANX.Framework.TestCenter.Strukturen.Design [Test] public void ConvertRayTest() { - var xnaConverter = new Microsoft.Xna.Framework.Design.RayConverter(); - var anxConverter = new ANX.Framework.Design.RayConverter(); - - var xnaObject = new Microsoft.Xna.Framework.Ray(new XnaVector3(1, 2, 3), new XnaVector3(4, 5, 6)); - var anxObject = new ANX.Framework.Ray(new AnxVector3(1, 2, 3), new AnxVector3(4, 5, 6)); + var xnaConverter = new XNADesign.RayConverter(); + var anxConverter = new ANXDesign.RayConverter(); + var xnaObject = new XnaRay(new XnaVector3(1, 2, 3), new XnaVector3(4, 5, 6)); + var anxObject = new AnxRay(new AnxVector3(1, 2, 3), new AnxVector3(4, 5, 6)); Assert.AreEqual(xnaConverter.ConvertToString(xnaObject), anxConverter.ConvertToString(anxObject)); // ray cannot convert from string @@ -101,11 +129,10 @@ namespace ANX.Framework.TestCenter.Strukturen.Design [Test] public void ConvertPointTest() { - var xnaConverter = new Microsoft.Xna.Framework.Design.PointConverter(); - var anxConverter = new ANX.Framework.Design.PointConverter(); - - var xnaObject = new Microsoft.Xna.Framework.Point(1, 2); - var anxObject = new ANX.Framework.Point(1, 2); + var xnaConverter = new XNADesign.PointConverter(); + var anxConverter = new ANXDesign.PointConverter(); + var xnaObject = new XnaPoint(1, 2); + var anxObject = new AnxPoint(1, 2); Assert.AreEqual(xnaConverter.ConvertToString(xnaObject), anxConverter.ConvertToString(anxObject)); Assert.AreEqual(anxObject, anxConverter.ConvertFrom(xnaConverter.ConvertToString(xnaObject))); @@ -114,11 +141,10 @@ namespace ANX.Framework.TestCenter.Strukturen.Design [Test] public void ConvertPlaneTest() { - var xnaConverter = new Microsoft.Xna.Framework.Design.PlaneConverter(); - var anxConverter = new ANX.Framework.Design.PlaneConverter(); - - var xnaObject = new Microsoft.Xna.Framework.Plane(new XnaVector3(1, 2, 3), 4); - var anxObject = new ANX.Framework.Plane(new AnxVector3(1, 2, 3), 4); + var xnaConverter = new XNADesign.PlaneConverter(); + var anxConverter = new ANXDesign.PlaneConverter(); + var xnaObject = new XnaPlane(new XnaVector3(1, 2, 3), 4); + var anxObject = new AnxPlane(new AnxVector3(1, 2, 3), 4); Assert.AreEqual(xnaConverter.ConvertToString(xnaObject), anxConverter.ConvertToString(anxObject)); // plane cannot convert from string @@ -127,11 +153,10 @@ namespace ANX.Framework.TestCenter.Strukturen.Design [Test] public void ConvertBoundingBoxTest() { - var xnaConverter = new Microsoft.Xna.Framework.Design.BoundingBoxConverter(); - var anxConverter = new ANX.Framework.Design.BoundingBoxConverter(); - - var xnaObject = new Microsoft.Xna.Framework.BoundingBox(new XnaVector3(1, 2, 3), new XnaVector3(4, 5, 6)); - var anxObject = new ANX.Framework.BoundingBox(new AnxVector3(1, 2, 3), new AnxVector3(4, 5, 6)); + var xnaConverter = new XNADesign.BoundingBoxConverter(); + var anxConverter = new ANXDesign.BoundingBoxConverter(); + var xnaObject = new XnaBoundingBox(new XnaVector3(1, 2, 3), new XnaVector3(4, 5, 6)); + var anxObject = new AnxBoundingBox(new AnxVector3(1, 2, 3), new AnxVector3(4, 5, 6)); Assert.AreEqual(xnaConverter.ConvertToString(xnaObject), anxConverter.ConvertToString(anxObject)); // plane cannot convert from string @@ -140,11 +165,10 @@ namespace ANX.Framework.TestCenter.Strukturen.Design [Test] public void ConvertBoundingSphereTest() { - var xnaConverter = new Microsoft.Xna.Framework.Design.BoundingSphereConverter(); - var anxConverter = new ANX.Framework.Design.BoundingSphereConverter(); - - var xnaObject = new Microsoft.Xna.Framework.BoundingSphere(new XnaVector3(1, 2, 3), 4); - var anxObject = new ANX.Framework.BoundingSphere(new AnxVector3(1, 2, 3), 4); + var xnaConverter = new XNADesign.BoundingSphereConverter(); + var anxConverter = new ANXDesign.BoundingSphereConverter(); + var xnaObject = new XnaBoundingSphere(new XnaVector3(1, 2, 3), 4); + var anxObject = new AnxBoundingSphere(new AnxVector3(1, 2, 3), 4); Assert.AreEqual(xnaConverter.ConvertToString(xnaObject), anxConverter.ConvertToString(anxObject)); // plane cannot convert from string @@ -153,11 +177,10 @@ namespace ANX.Framework.TestCenter.Strukturen.Design [Test] public void ConvertMatrixTest() { - var xnaConverter = new Microsoft.Xna.Framework.Design.MatrixConverter(); - var anxConverter = new ANX.Framework.Design.MatrixConverter(); - - var xnaObject = new Microsoft.Xna.Framework.Matrix(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16); - var anxObject = new ANX.Framework.Matrix(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16); + var xnaConverter = new XNADesign.MatrixConverter(); + var anxConverter = new ANXDesign.MatrixConverter(); + var xnaObject = new XnaMatrix(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16); + var anxObject = new AnxMatrix(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16); Assert.AreEqual(xnaConverter.ConvertToString(xnaObject), anxConverter.ConvertToString(anxObject)); // matrix cannot convert from string @@ -166,8 +189,10 @@ namespace ANX.Framework.TestCenter.Strukturen.Design [Test] public void ConvertBoundingFrustumTest() { - var xnaObject = new Microsoft.Xna.Framework.BoundingFrustum(new Microsoft.Xna.Framework.Matrix(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)); - var anxObject = new ANX.Framework.BoundingFrustum(new ANX.Framework.Matrix(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)); + var xnaMatrix = new XnaMatrix(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16); + var anxMatrix = new AnxMatrix(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16); + var xnaObject = new XnaBoundingFrustum(xnaMatrix); + var anxObject = new AnxBoundingFrustum(anxMatrix); AssertHelper.ConvertEquals(xnaObject, anxObject, "ConvertBoundingFrustumTest"); } diff --git a/ANX.Framework/GamerServices/AvatarAnimationPreset.cs b/ANX.Framework/GamerServices/AvatarAnimationPreset.cs index 35351e26..48e56375 100644 --- a/ANX.Framework/GamerServices/AvatarAnimationPreset.cs +++ b/ANX.Framework/GamerServices/AvatarAnimationPreset.cs @@ -1,5 +1,6 @@ #region Using Statements using System; +using ANX.Framework.NonXNA.Development; #endregion // Using Statements @@ -9,6 +10,8 @@ using System; namespace ANX.Framework.GamerServices { + [PercentageComplete(100)] + [TestState(TestStateAttribute.TestState.Tested)] public enum AvatarAnimationPreset { Stand0, diff --git a/ANX.Framework/GamerServices/AvatarBodyType.cs b/ANX.Framework/GamerServices/AvatarBodyType.cs index 3f24f856..5bfefb1f 100644 --- a/ANX.Framework/GamerServices/AvatarBodyType.cs +++ b/ANX.Framework/GamerServices/AvatarBodyType.cs @@ -1,5 +1,6 @@ #region Using Statements using System; +using ANX.Framework.NonXNA.Development; #endregion // Using Statements @@ -9,6 +10,8 @@ using System; namespace ANX.Framework.GamerServices { + [PercentageComplete(100)] + [TestState(TestStateAttribute.TestState.Tested)] public enum AvatarBodyType { Female, diff --git a/ANX.Framework/GamerServices/AvatarBone.cs b/ANX.Framework/GamerServices/AvatarBone.cs index 268c5a4e..05756774 100644 --- a/ANX.Framework/GamerServices/AvatarBone.cs +++ b/ANX.Framework/GamerServices/AvatarBone.cs @@ -1,13 +1,17 @@ #region Using Statements using System; +using ANX.Framework.NonXNA.Development; #endregion // Using Statements // This file is part of the ANX.Framework created by the // "ANX.Framework developer group" and released under the Ms-PL license. // For details see: http://anxframework.codeplex.com/license + namespace ANX.Framework.GamerServices { + [PercentageComplete(100)] + [TestState(TestStateAttribute.TestState.Tested)] public enum AvatarBone { Root = 0, diff --git a/ANX.Framework/GamerServices/AvatarEye.cs b/ANX.Framework/GamerServices/AvatarEye.cs index 6c6d676e..2b1e1be0 100644 --- a/ANX.Framework/GamerServices/AvatarEye.cs +++ b/ANX.Framework/GamerServices/AvatarEye.cs @@ -1,5 +1,6 @@ #region Using Statements using System; +using ANX.Framework.NonXNA.Development; #endregion // Using Statements @@ -9,6 +10,8 @@ using System; namespace ANX.Framework.GamerServices { + [PercentageComplete(100)] + [TestState(TestStateAttribute.TestState.Tested)] public enum AvatarEye { Neutral, diff --git a/ANX.Framework/GamerServices/AvatarEyebrow.cs b/ANX.Framework/GamerServices/AvatarEyebrow.cs index 106c1931..2021f764 100644 --- a/ANX.Framework/GamerServices/AvatarEyebrow.cs +++ b/ANX.Framework/GamerServices/AvatarEyebrow.cs @@ -1,5 +1,6 @@ #region Using Statements using System; +using ANX.Framework.NonXNA.Development; #endregion // Using Statements @@ -9,6 +10,8 @@ using System; namespace ANX.Framework.GamerServices { + [PercentageComplete(100)] + [TestState(TestStateAttribute.TestState.Tested)] public enum AvatarEyebrow { Neutral, diff --git a/ANX.Framework/GamerServices/AvatarMouth.cs b/ANX.Framework/GamerServices/AvatarMouth.cs index f19520fb..9ebc72a8 100644 --- a/ANX.Framework/GamerServices/AvatarMouth.cs +++ b/ANX.Framework/GamerServices/AvatarMouth.cs @@ -1,5 +1,6 @@ #region Using Statements using System; +using ANX.Framework.NonXNA.Development; #endregion // Using Statements @@ -9,6 +10,8 @@ using System; namespace ANX.Framework.GamerServices { + [PercentageComplete(100)] + [TestState(TestStateAttribute.TestState.Tested)] public enum AvatarMouth { Neutral, diff --git a/ANX.Framework/GamerServices/AvatarRendererState.cs b/ANX.Framework/GamerServices/AvatarRendererState.cs index ef6ce8cd..06c0f5f9 100644 --- a/ANX.Framework/GamerServices/AvatarRendererState.cs +++ b/ANX.Framework/GamerServices/AvatarRendererState.cs @@ -1,5 +1,6 @@ #region Using Statements using System; +using ANX.Framework.NonXNA.Development; #endregion // Using Statements @@ -9,6 +10,8 @@ using System; namespace ANX.Framework.GamerServices { + [PercentageComplete(100)] + [TestState(TestStateAttribute.TestState.Tested)] public enum AvatarRendererState { Loading, diff --git a/ANX.Framework/GamerServices/ControllerSensitivity.cs b/ANX.Framework/GamerServices/ControllerSensitivity.cs index ad33060f..af99cf0e 100644 --- a/ANX.Framework/GamerServices/ControllerSensitivity.cs +++ b/ANX.Framework/GamerServices/ControllerSensitivity.cs @@ -1,5 +1,6 @@ #region Using Statements using System; +using ANX.Framework.NonXNA.Development; #endregion // Using Statements @@ -9,6 +10,8 @@ using System; namespace ANX.Framework.GamerServices { + [PercentageComplete(100)] + [TestState(TestStateAttribute.TestState.Tested)] public enum ControllerSensitivity { Low, diff --git a/ANX.Framework/GamerServices/GameDifficulty.cs b/ANX.Framework/GamerServices/GameDifficulty.cs index f48b8eea..d9197dce 100644 --- a/ANX.Framework/GamerServices/GameDifficulty.cs +++ b/ANX.Framework/GamerServices/GameDifficulty.cs @@ -1,5 +1,6 @@ #region Using Statements using System; +using ANX.Framework.NonXNA.Development; #endregion // Using Statements @@ -9,6 +10,8 @@ using System; namespace ANX.Framework.GamerServices { + [PercentageComplete(100)] + [TestState(TestStateAttribute.TestState.Tested)] public enum GameDifficulty { Easy = 0, diff --git a/ANX.Framework/GamerServices/GamerPresence.cs b/ANX.Framework/GamerServices/GamerPresence.cs index d8dacb32..b585e0a1 100644 --- a/ANX.Framework/GamerServices/GamerPresence.cs +++ b/ANX.Framework/GamerServices/GamerPresence.cs @@ -1,5 +1,6 @@ #region Using Statements using System; +using ANX.Framework.NonXNA.Development; #endregion // Using Statements @@ -9,30 +10,20 @@ using System; namespace ANX.Framework.GamerServices { + [PercentageComplete(0)] + [TestState(TestStateAttribute.TestState.Untested)] public sealed class GamerPresence { - public GamerPresenceMode PresenceMode - { - get - { - throw new NotImplementedException(); - } - set - { - throw new NotImplementedException(); - } - } - - public int PresenceValue - { - get - { - throw new NotImplementedException(); - } - set - { - throw new NotImplementedException(); - } - } + public GamerPresenceMode PresenceMode + { + get { throw new NotImplementedException(); } + set { throw new NotImplementedException(); } + } + + public int PresenceValue + { + get { throw new NotImplementedException(); } + set { throw new NotImplementedException(); } + } } } diff --git a/ANX.Framework/GamerServices/GamerPresenceMode.cs b/ANX.Framework/GamerServices/GamerPresenceMode.cs index c55a833b..7ce43373 100644 --- a/ANX.Framework/GamerServices/GamerPresenceMode.cs +++ b/ANX.Framework/GamerServices/GamerPresenceMode.cs @@ -1,5 +1,6 @@ #region Using Statements using System; +using ANX.Framework.NonXNA.Development; #endregion // Using Statements @@ -9,6 +10,8 @@ using System; namespace ANX.Framework.GamerServices { + [PercentageComplete(100)] + [TestState(TestStateAttribute.TestState.Tested)] public enum GamerPresenceMode { None, diff --git a/ANX.Framework/GamerServices/GamerPrivilegeSetting.cs b/ANX.Framework/GamerServices/GamerPrivilegeSetting.cs index 7c60f0e8..27551a45 100644 --- a/ANX.Framework/GamerServices/GamerPrivilegeSetting.cs +++ b/ANX.Framework/GamerServices/GamerPrivilegeSetting.cs @@ -1,5 +1,6 @@ #region Using Statements using System; +using ANX.Framework.NonXNA.Development; #endregion // Using Statements @@ -9,6 +10,8 @@ using System; namespace ANX.Framework.GamerServices { + [PercentageComplete(100)] + [TestState(TestStateAttribute.TestState.Tested)] public enum GamerPrivilegeSetting { Blocked = 0, diff --git a/ANX.Framework/GamerServices/GamerZone.cs b/ANX.Framework/GamerServices/GamerZone.cs index ef7641b2..812ce76f 100644 --- a/ANX.Framework/GamerServices/GamerZone.cs +++ b/ANX.Framework/GamerServices/GamerZone.cs @@ -1,5 +1,6 @@ #region Using Statements using System; +using ANX.Framework.NonXNA.Development; #endregion // Using Statements @@ -9,6 +10,8 @@ using System; namespace ANX.Framework.GamerServices { + [PercentageComplete(100)] + [TestState(TestStateAttribute.TestState.Tested)] public enum GamerZone { Family = 3, diff --git a/ANX.Framework/GamerServices/InviteAcceptedEventArgs.cs b/ANX.Framework/GamerServices/InviteAcceptedEventArgs.cs index 6d847c72..2840614e 100644 --- a/ANX.Framework/GamerServices/InviteAcceptedEventArgs.cs +++ b/ANX.Framework/GamerServices/InviteAcceptedEventArgs.cs @@ -1,5 +1,6 @@ #region Using Statements using System; +using ANX.Framework.NonXNA.Development; #endregion // Using Statements @@ -9,6 +10,8 @@ using System; namespace ANX.Framework.GamerServices { + [PercentageComplete(100)] + [TestState(TestStateAttribute.TestState.Tested)] public class InviteAcceptedEventArgs : EventArgs { public InviteAcceptedEventArgs(SignedInGamer gamer, bool isCurrentSession) @@ -17,16 +20,7 @@ namespace ANX.Framework.GamerServices this.IsCurrentSession = isCurrentSession; } - public SignedInGamer Gamer - { - get; - private set; - } - - public bool IsCurrentSession - { - get; - private set; - } + public SignedInGamer Gamer { get; private set; } + public bool IsCurrentSession { get; private set; } } } diff --git a/ANX.Framework/GamerServices/LeaderboardKey.cs b/ANX.Framework/GamerServices/LeaderboardKey.cs index 65bca32b..03c5ee79 100644 --- a/ANX.Framework/GamerServices/LeaderboardKey.cs +++ b/ANX.Framework/GamerServices/LeaderboardKey.cs @@ -1,5 +1,6 @@ #region Using Statements using System; +using ANX.Framework.NonXNA.Development; #endregion // Using Statements @@ -9,6 +10,8 @@ using System; namespace ANX.Framework.GamerServices { + [PercentageComplete(100)] + [TestState(TestStateAttribute.TestState.Tested)] public enum LeaderboardKey { BestScoreLifeTime, diff --git a/ANX.Framework/GamerServices/LeaderboardOutcome.cs b/ANX.Framework/GamerServices/LeaderboardOutcome.cs index ae07da78..15e6bbc8 100644 --- a/ANX.Framework/GamerServices/LeaderboardOutcome.cs +++ b/ANX.Framework/GamerServices/LeaderboardOutcome.cs @@ -1,5 +1,6 @@ #region Using Statements using System; +using ANX.Framework.NonXNA.Development; #endregion // Using Statements @@ -9,6 +10,8 @@ using System; namespace ANX.Framework.GamerServices { + [PercentageComplete(100)] + [TestState(TestStateAttribute.TestState.Tested)] public enum LeaderboardOutcome { Loss = 2, diff --git a/ANX.Framework/GamerServices/MessageBoxIcon.cs b/ANX.Framework/GamerServices/MessageBoxIcon.cs index 86e44826..cc00ac92 100644 --- a/ANX.Framework/GamerServices/MessageBoxIcon.cs +++ b/ANX.Framework/GamerServices/MessageBoxIcon.cs @@ -1,5 +1,6 @@ #region Using Statements using System; +using ANX.Framework.NonXNA.Development; #endregion // Using Statements @@ -9,6 +10,8 @@ using System; namespace ANX.Framework.GamerServices { + [PercentageComplete(100)] + [TestState(TestStateAttribute.TestState.Tested)] public enum MessageBoxIcon { Alert = 3, diff --git a/ANX.Framework/GamerServices/NotificationPosition.cs b/ANX.Framework/GamerServices/NotificationPosition.cs index 745cdee2..83903f6d 100644 --- a/ANX.Framework/GamerServices/NotificationPosition.cs +++ b/ANX.Framework/GamerServices/NotificationPosition.cs @@ -1,5 +1,6 @@ #region Using Statements using System; +using ANX.Framework.NonXNA.Development; #endregion // Using Statements @@ -9,6 +10,8 @@ using System; namespace ANX.Framework.GamerServices { + [PercentageComplete(100)] + [TestState(TestStateAttribute.TestState.Tested)] public enum NotificationPosition { BottomCenter = 7, diff --git a/ANX.Framework/GamerServices/RacingCameraAngle.cs b/ANX.Framework/GamerServices/RacingCameraAngle.cs index f41aebd6..4dabffe1 100644 --- a/ANX.Framework/GamerServices/RacingCameraAngle.cs +++ b/ANX.Framework/GamerServices/RacingCameraAngle.cs @@ -1,5 +1,6 @@ #region Using Statements using System; +using ANX.Framework.NonXNA.Development; #endregion // Using Statements @@ -9,6 +10,8 @@ using System; namespace ANX.Framework.GamerServices { + [PercentageComplete(100)] + [TestState(TestStateAttribute.TestState.Tested)] public enum RacingCameraAngle { Back, diff --git a/ANX.Framework/GamerServices/SignedInEventArgs.cs b/ANX.Framework/GamerServices/SignedInEventArgs.cs index f23a9db4..b0893783 100644 --- a/ANX.Framework/GamerServices/SignedInEventArgs.cs +++ b/ANX.Framework/GamerServices/SignedInEventArgs.cs @@ -1,5 +1,6 @@ #region Using Statements using System; +using ANX.Framework.NonXNA.Development; #endregion // Using Statements @@ -9,18 +10,15 @@ using System; namespace ANX.Framework.GamerServices { + [PercentageComplete(100)] + [TestState(TestStateAttribute.TestState.Tested)] public class SignedInEventArgs : EventArgs { public SignedInEventArgs(SignedInGamer gamer) - : base() { this.Gamer = gamer; } - public SignedInGamer Gamer - { - get; - internal set; - } + public SignedInGamer Gamer { get; internal set; } } } diff --git a/ANX.Framework/GamerServices/SignedOutEventArgs.cs b/ANX.Framework/GamerServices/SignedOutEventArgs.cs index 2eebab31..cbd05cf1 100644 --- a/ANX.Framework/GamerServices/SignedOutEventArgs.cs +++ b/ANX.Framework/GamerServices/SignedOutEventArgs.cs @@ -1,5 +1,6 @@ #region Using Statements using System; +using ANX.Framework.NonXNA.Development; #endregion // Using Statements @@ -9,6 +10,8 @@ using System; namespace ANX.Framework.GamerServices { + [PercentageComplete(100)] + [TestState(TestStateAttribute.TestState.Tested)] public class SignedOutEventArgs : EventArgs { public SignedOutEventArgs(SignedInGamer gamer) @@ -16,10 +19,6 @@ namespace ANX.Framework.GamerServices this.Gamer = gamer; } - public SignedInGamer Gamer - { - get; - private set; - } + public SignedInGamer Gamer { get; private set; } } } diff --git a/ANX.Framework/Input/ButtonState.cs b/ANX.Framework/Input/ButtonState.cs index 9e9a9535..110ac0a1 100644 --- a/ANX.Framework/Input/ButtonState.cs +++ b/ANX.Framework/Input/ButtonState.cs @@ -1,9 +1,13 @@ +using ANX.Framework.NonXNA.Development; + // This file is part of the ANX.Framework created by the // "ANX.Framework developer group" and released under the Ms-PL license. // For details see: http://anxframework.codeplex.com/license namespace ANX.Framework.Input { + [PercentageComplete(100)] + [TestState(TestStateAttribute.TestState.Tested)] public enum ButtonState : byte { Released, diff --git a/ANX.Framework/Input/Buttons.cs b/ANX.Framework/Input/Buttons.cs index 37dbbb4b..e5bd426d 100644 --- a/ANX.Framework/Input/Buttons.cs +++ b/ANX.Framework/Input/Buttons.cs @@ -1,4 +1,5 @@ using System; +using ANX.Framework.NonXNA.Development; // This file is part of the ANX.Framework created by the // "ANX.Framework developer group" and released under the Ms-PL license. @@ -6,6 +7,8 @@ using System; namespace ANX.Framework.Input { + [PercentageComplete(100)] + [TestState(TestStateAttribute.TestState.Tested)] [Flags] public enum Buttons { diff --git a/ANX.Framework/Input/GamePadDeadZone.cs b/ANX.Framework/Input/GamePadDeadZone.cs index 3ed24bc4..209ccef7 100644 --- a/ANX.Framework/Input/GamePadDeadZone.cs +++ b/ANX.Framework/Input/GamePadDeadZone.cs @@ -1,9 +1,13 @@ +using ANX.Framework.NonXNA.Development; + // This file is part of the ANX.Framework created by the // "ANX.Framework developer group" and released under the Ms-PL license. // For details see: http://anxframework.codeplex.com/license namespace ANX.Framework.Input { + [PercentageComplete(100)] + [TestState(TestStateAttribute.TestState.Tested)] public enum GamePadDeadZone : byte { None, diff --git a/ANX.Framework/Input/GamePadType.cs b/ANX.Framework/Input/GamePadType.cs index f80154af..2bea73d6 100644 --- a/ANX.Framework/Input/GamePadType.cs +++ b/ANX.Framework/Input/GamePadType.cs @@ -1,9 +1,13 @@ +using ANX.Framework.NonXNA.Development; + // This file is part of the ANX.Framework created by the // "ANX.Framework developer group" and released under the Ms-PL license. // For details see: http://anxframework.codeplex.com/license namespace ANX.Framework.Input { + [PercentageComplete(100)] + [TestState(TestStateAttribute.TestState.Tested)] public enum GamePadType : short { Unknown, diff --git a/ANX.Framework/Input/KeyState.cs b/ANX.Framework/Input/KeyState.cs index f72f9b8c..e01c2092 100644 --- a/ANX.Framework/Input/KeyState.cs +++ b/ANX.Framework/Input/KeyState.cs @@ -1,9 +1,13 @@ +using ANX.Framework.NonXNA.Development; + // This file is part of the ANX.Framework created by the // "ANX.Framework developer group" and released under the Ms-PL license. // For details see: http://anxframework.codeplex.com/license namespace ANX.Framework.Input { + [PercentageComplete(100)] + [TestState(TestStateAttribute.TestState.Tested)] public enum KeyState { Up, diff --git a/ANX.Framework/Input/Keys.cs b/ANX.Framework/Input/Keys.cs index eac4b8d4..a2ba044e 100644 --- a/ANX.Framework/Input/Keys.cs +++ b/ANX.Framework/Input/Keys.cs @@ -1,9 +1,13 @@ +using ANX.Framework.NonXNA.Development; + // This file is part of the ANX.Framework created by the // "ANX.Framework developer group" and released under the Ms-PL license. // For details see: http://anxframework.codeplex.com/license namespace ANX.Framework.Input { + [PercentageComplete(100)] + [TestState(TestStateAttribute.TestState.Tested)] public enum Keys : byte { None = 0, diff --git a/ANX.Framework/Input/Touch/GestureSample.cs b/ANX.Framework/Input/Touch/GestureSample.cs index d0151dc1..2a9e590e 100644 --- a/ANX.Framework/Input/Touch/GestureSample.cs +++ b/ANX.Framework/Input/Touch/GestureSample.cs @@ -1,4 +1,5 @@ using System; +using ANX.Framework.NonXNA.Development; // This file is part of the ANX.Framework created by the // "ANX.Framework developer group" and released under the Ms-PL license. @@ -6,6 +7,8 @@ using System; namespace ANX.Framework.Input.Touch { + [PercentageComplete(100)] + [TestState(TestStateAttribute.TestState.Untested)] public struct GestureSample { #region Private @@ -18,58 +21,40 @@ namespace ANX.Framework.Input.Touch #endregion #region Public - public Vector2 Delta - { - get - { - return this.delta; - } - } + public Vector2 Delta + { + get { return this.delta; } + } - public Vector2 Delta2 - { - get - { - return this.delta2; - } - } + public Vector2 Delta2 + { + get { return this.delta2; } + } - public GestureType GestureType - { - get - { - return this.gestureType; - } - } + public GestureType GestureType + { + get { return this.gestureType; } + } - public Vector2 Position - { - get - { - return this.position; - } - } + public Vector2 Position + { + get { return this.position; } + } - public Vector2 Position2 - { - get - { - return this.position2; - } - } + public Vector2 Position2 + { + get { return this.position2; } + } - public TimeSpan Timestamp - { - get - { - return this.timestamp; - } - } - #endregion + public TimeSpan Timestamp + { + get { return this.timestamp; } + } + #endregion #region Constructor - public GestureSample(GestureType gestureType, TimeSpan timestamp, Vector2 position, - Vector2 position2, Vector2 delta, Vector2 delta2) + public GestureSample(GestureType gestureType, TimeSpan timestamp, Vector2 position, Vector2 position2, + Vector2 delta, Vector2 delta2) { this.gestureType = gestureType; this.timestamp = timestamp; diff --git a/ANX.Framework/Input/Touch/GestureType.cs b/ANX.Framework/Input/Touch/GestureType.cs index a12b06fd..7dab637f 100644 --- a/ANX.Framework/Input/Touch/GestureType.cs +++ b/ANX.Framework/Input/Touch/GestureType.cs @@ -1,4 +1,5 @@ using System; +using ANX.Framework.NonXNA.Development; // This file is part of the ANX.Framework created by the // "ANX.Framework developer group" and released under the Ms-PL license. @@ -6,6 +7,8 @@ using System; namespace ANX.Framework.Input.Touch { + [PercentageComplete(100)] + [TestState(TestStateAttribute.TestState.Tested)] [Flags] public enum GestureType { diff --git a/ANX.Framework/Input/Touch/TouchLocationState.cs b/ANX.Framework/Input/Touch/TouchLocationState.cs index f2499c7b..e6abbd9a 100644 --- a/ANX.Framework/Input/Touch/TouchLocationState.cs +++ b/ANX.Framework/Input/Touch/TouchLocationState.cs @@ -1,9 +1,13 @@ +using ANX.Framework.NonXNA.Development; + // This file is part of the ANX.Framework created by the // "ANX.Framework developer group" and released under the Ms-PL license. // For details see: http://anxframework.codeplex.com/license namespace ANX.Framework.Input.Touch { + [PercentageComplete(100)] + [TestState(TestStateAttribute.TestState.Tested)] public enum TouchLocationState { Invalid = 0, diff --git a/ANX.Framework/Net/AvailableNetworkSession.cs b/ANX.Framework/Net/AvailableNetworkSession.cs index 72b53ded..44256d87 100644 --- a/ANX.Framework/Net/AvailableNetworkSession.cs +++ b/ANX.Framework/Net/AvailableNetworkSession.cs @@ -1,6 +1,7 @@ #region Using Statements using System; using System.Net; +using ANX.Framework.NonXNA.Development; #endregion // Using Statements @@ -10,133 +11,27 @@ using System.Net; namespace ANX.Framework.Net { - public sealed class AvailableNetworkSession - { - private NetworkSessionType sessionType; - private int openPublicGamerSlots; - private QualityOfService qualityOfService; - private NetworkSessionProperties sessionProperties; -#if !WINDOWSMETRO //TODO: search replacement for Win8 - private IPEndPoint endPoint; - private IPEndPoint internalendPoint; -#endif - private int _currentGameCount; - private string hostGamertag; - private int openPrivateGamerSlots; - - public AvailableNetworkSession() - { - qualityOfService = new QualityOfService(); - } - - public int CurrentGamerCount - { - get - { - return _currentGameCount; - } - internal set - { - _currentGameCount = value; - } - } - - public string HostGamertag - { - get - { - return hostGamertag; - } - internal set - { - hostGamertag = value; - } - } - - public int OpenPrivateGamerSlots - { - get - { - return openPrivateGamerSlots; - } - internal set - { - openPrivateGamerSlots = value; - } - } - - public int OpenPublicGamerSlots - { - get - { - return openPublicGamerSlots; - } - internal set - { - openPublicGamerSlots = value; - } - } - - public QualityOfService QualityOfService - { - get - { - return qualityOfService; - } - internal set - { - qualityOfService = value; - } - } - - public NetworkSessionProperties SessionProperties - { - get - { - return sessionProperties; - } - internal set - { - sessionProperties = value; - } - } - -#if !WINDOWSMETRO //TODO: search replacement for Win8 - internal IPEndPoint EndPoint - { - get - { - return endPoint; - } - set - { - endPoint = value; - } - } - - internal IPEndPoint InternalEndpont - { - get - { - return internalendPoint; - } - set - { - internalendPoint = value; - } - } -#endif - - internal NetworkSessionType SessionType + [PercentageComplete(0)] + [TestState(TestStateAttribute.TestState.Untested)] + public sealed class AvailableNetworkSession + { + public AvailableNetworkSession() { - get - { - return this.sessionType; - } - set - { - this.sessionType = value; - } + QualityOfService = new QualityOfService(); } + + public int CurrentGamerCount { get; internal set; } + public string HostGamertag { get; internal set; } + public int OpenPrivateGamerSlots { get; internal set; } + public int OpenPublicGamerSlots { get; internal set; } + public QualityOfService QualityOfService { get; internal set; } + public NetworkSessionProperties SessionProperties { get; internal set; } + +#if !WINDOWSMETRO //TODO: search replacement for Win8 + internal IPEndPoint EndPoint { get; set; } + internal IPEndPoint InternalEndpont { get; set; } +#endif + + internal NetworkSessionType SessionType { get; set; } } } diff --git a/ANX.Framework/Net/AvailableNetworkSessionCollection.cs b/ANX.Framework/Net/AvailableNetworkSessionCollection.cs index 60f185df..0b859852 100644 --- a/ANX.Framework/Net/AvailableNetworkSessionCollection.cs +++ b/ANX.Framework/Net/AvailableNetworkSessionCollection.cs @@ -1,6 +1,7 @@ using System; using System.Collections.ObjectModel; using System.Collections.Generic; +using ANX.Framework.NonXNA.Development; // This file is part of the ANX.Framework created by the // "ANX.Framework developer group" and released under the Ms-PL license. @@ -8,6 +9,8 @@ using System.Collections.Generic; namespace ANX.Framework.Net { + [PercentageComplete(0)] + [TestState(TestStateAttribute.TestState.Untested)] public sealed class AvailableNetworkSessionCollection : ReadOnlyCollection, IDisposable { diff --git a/ANX.Framework/Net/GameEndedEventArgs.cs b/ANX.Framework/Net/GameEndedEventArgs.cs index 7206ee65..3e5ffea8 100644 --- a/ANX.Framework/Net/GameEndedEventArgs.cs +++ b/ANX.Framework/Net/GameEndedEventArgs.cs @@ -1,4 +1,5 @@ using System; +using ANX.Framework.NonXNA.Development; // This file is part of the ANX.Framework created by the // "ANX.Framework developer group" and released under the Ms-PL license. @@ -6,7 +7,9 @@ using System; namespace ANX.Framework.Net { - public class GameEndedEventArgs : EventArgs - { - } + [PercentageComplete(100)] + [TestState(TestStateAttribute.TestState.Tested)] + public class GameEndedEventArgs : EventArgs + { + } } diff --git a/ANX.Framework/Net/GameStartedEventArgs.cs b/ANX.Framework/Net/GameStartedEventArgs.cs index e1dad92f..35944985 100644 --- a/ANX.Framework/Net/GameStartedEventArgs.cs +++ b/ANX.Framework/Net/GameStartedEventArgs.cs @@ -1,4 +1,5 @@ using System; +using ANX.Framework.NonXNA.Development; // This file is part of the ANX.Framework created by the // "ANX.Framework developer group" and released under the Ms-PL license. @@ -6,7 +7,9 @@ using System; namespace ANX.Framework.Net { - public class GameStartedEventArgs : EventArgs - { - } + [PercentageComplete(100)] + [TestState(TestStateAttribute.TestState.Tested)] + public class GameStartedEventArgs : EventArgs + { + } } diff --git a/ANX.Framework/Net/GamerJoinedEventArgs.cs b/ANX.Framework/Net/GamerJoinedEventArgs.cs index eb0ac998..8af0fc27 100644 --- a/ANX.Framework/Net/GamerJoinedEventArgs.cs +++ b/ANX.Framework/Net/GamerJoinedEventArgs.cs @@ -1,4 +1,5 @@ using System; +using ANX.Framework.NonXNA.Development; // This file is part of the ANX.Framework created by the // "ANX.Framework developer group" and released under the Ms-PL license. @@ -6,17 +7,15 @@ using System; namespace ANX.Framework.Net { - public class GamerJoinedEventArgs : EventArgs - { - public NetworkGamer Gamer - { - get; - private set; - } + [PercentageComplete(100)] + [TestState(TestStateAttribute.TestState.Tested)] + public class GamerJoinedEventArgs : EventArgs + { + public NetworkGamer Gamer { get; private set; } - public GamerJoinedEventArgs(NetworkGamer gamer) - { - Gamer = gamer; - } - } + public GamerJoinedEventArgs(NetworkGamer gamer) + { + Gamer = gamer; + } + } } diff --git a/ANX.Framework/Net/GamerLeftEventArgs.cs b/ANX.Framework/Net/GamerLeftEventArgs.cs index 1f2fd81e..70e3799e 100644 --- a/ANX.Framework/Net/GamerLeftEventArgs.cs +++ b/ANX.Framework/Net/GamerLeftEventArgs.cs @@ -1,4 +1,5 @@ using System; +using ANX.Framework.NonXNA.Development; // This file is part of the ANX.Framework created by the // "ANX.Framework developer group" and released under the Ms-PL license. @@ -6,17 +7,15 @@ using System; namespace ANX.Framework.Net { - public class GamerLeftEventArgs : EventArgs - { - public NetworkGamer Gamer - { - get; - private set; - } + [PercentageComplete(100)] + [TestState(TestStateAttribute.TestState.Tested)] + public class GamerLeftEventArgs : EventArgs + { + public NetworkGamer Gamer { get; private set; } - public GamerLeftEventArgs(NetworkGamer gamer) - { - Gamer = gamer; - } - } + public GamerLeftEventArgs(NetworkGamer gamer) + { + Gamer = gamer; + } + } } diff --git a/ANX.Framework/Net/HostChangedEventArgs.cs b/ANX.Framework/Net/HostChangedEventArgs.cs index 09496bda..85df5f16 100644 --- a/ANX.Framework/Net/HostChangedEventArgs.cs +++ b/ANX.Framework/Net/HostChangedEventArgs.cs @@ -1,4 +1,5 @@ using System; +using ANX.Framework.NonXNA.Development; // This file is part of the ANX.Framework created by the // "ANX.Framework developer group" and released under the Ms-PL license. @@ -6,24 +7,17 @@ using System; namespace ANX.Framework.Net { - public class HostChangedEventArgs : EventArgs - { - public NetworkGamer OldHost - { - get; - private set; - } + [PercentageComplete(100)] + [TestState(TestStateAttribute.TestState.Tested)] + public class HostChangedEventArgs : EventArgs + { + public NetworkGamer OldHost { get; private set; } + public NetworkGamer NewHost { get; private set; } - public NetworkGamer NewHost - { - get; - private set; - } - - public HostChangedEventArgs(NetworkGamer oldHost, NetworkGamer newHost) - { - OldHost = oldHost; - NewHost = newHost; - } - } + public HostChangedEventArgs(NetworkGamer oldHost, NetworkGamer newHost) + { + OldHost = oldHost; + NewHost = newHost; + } + } } diff --git a/ANX.Framework/Net/LocalNetworkGamer.cs b/ANX.Framework/Net/LocalNetworkGamer.cs index 6b441937..83a84bae 100644 --- a/ANX.Framework/Net/LocalNetworkGamer.cs +++ b/ANX.Framework/Net/LocalNetworkGamer.cs @@ -1,5 +1,6 @@ using System; using ANX.Framework.GamerServices; +using ANX.Framework.NonXNA.Development; // This file is part of the ANX.Framework created by the // "ANX.Framework developer group" and released under the Ms-PL license. @@ -7,6 +8,8 @@ using ANX.Framework.GamerServices; namespace ANX.Framework.Net { + [PercentageComplete(0)] + [TestState(TestStateAttribute.TestState.Untested)] public sealed class LocalNetworkGamer : NetworkGamer { public SignedInGamer SignedInGamer diff --git a/ANX.Framework/Net/NetworkException.cs b/ANX.Framework/Net/NetworkException.cs index 7f8f45e3..b7ad309b 100644 --- a/ANX.Framework/Net/NetworkException.cs +++ b/ANX.Framework/Net/NetworkException.cs @@ -1,5 +1,6 @@ using System; using System.Runtime.Serialization; +using ANX.Framework.NonXNA.Development; // This file is part of the ANX.Framework created by the // "ANX.Framework developer group" and released under the Ms-PL license. @@ -7,6 +8,8 @@ using System.Runtime.Serialization; namespace ANX.Framework.Net { + [PercentageComplete(0)] + [TestState(TestStateAttribute.TestState.Untested)] public class NetworkException : Exception { public NetworkException() @@ -24,8 +27,7 @@ namespace ANX.Framework.Net } #if !WINDOWSMETRO //TODO: search replacement for Win8 - protected NetworkException(SerializationInfo info, - StreamingContext context) + protected NetworkException(SerializationInfo info, StreamingContext context) : base(info, context) { } diff --git a/ANX.Framework/Net/NetworkGamer.cs b/ANX.Framework/Net/NetworkGamer.cs index 8ef590ca..0bbe2ff2 100644 --- a/ANX.Framework/Net/NetworkGamer.cs +++ b/ANX.Framework/Net/NetworkGamer.cs @@ -1,5 +1,6 @@ using System; using ANX.Framework.GamerServices; +using ANX.Framework.NonXNA.Development; // This file is part of the ANX.Framework created by the // "ANX.Framework developer group" and released under the Ms-PL license. @@ -7,6 +8,8 @@ using ANX.Framework.GamerServices; namespace ANX.Framework.Net { + [PercentageComplete(0)] + [TestState(TestStateAttribute.TestState.Untested)] public class NetworkGamer : Gamer { public bool IsHost diff --git a/ANX.Framework/Net/NetworkMachine.cs b/ANX.Framework/Net/NetworkMachine.cs index 49aa0bbd..8d659e6e 100644 --- a/ANX.Framework/Net/NetworkMachine.cs +++ b/ANX.Framework/Net/NetworkMachine.cs @@ -1,5 +1,6 @@ using System; using ANX.Framework.GamerServices; +using ANX.Framework.NonXNA.Development; // This file is part of the ANX.Framework created by the // "ANX.Framework developer group" and released under the Ms-PL license. @@ -7,6 +8,8 @@ using ANX.Framework.GamerServices; namespace ANX.Framework.Net { + [PercentageComplete(0)] + [TestState(TestStateAttribute.TestState.Untested)] public sealed class NetworkMachine { public GamerCollection Gamers diff --git a/ANX.Framework/Net/NetworkSession.cs b/ANX.Framework/Net/NetworkSession.cs index 049f0447..ead7d83f 100644 --- a/ANX.Framework/Net/NetworkSession.cs +++ b/ANX.Framework/Net/NetworkSession.cs @@ -1,6 +1,7 @@ using System; using ANX.Framework.GamerServices; using System.Collections.Generic; +using ANX.Framework.NonXNA.Development; // This file is part of the ANX.Framework created by the // "ANX.Framework developer group" and released under the Ms-PL license. @@ -8,6 +9,8 @@ using System.Collections.Generic; namespace ANX.Framework.Net { + [PercentageComplete(0)] + [TestState(TestStateAttribute.TestState.Untested)] public sealed class NetworkSession : IDisposable { public const int MaxSupportedGamers = 31; @@ -245,43 +248,37 @@ namespace ANX.Framework.Net throw new NotImplementedException(); } - public static NetworkSession Create(NetworkSessionType sessionType, - int maxLocalGamers, int maxGamers) + public static NetworkSession Create(NetworkSessionType sessionType, int maxLocalGamers, int maxGamers) { throw new NotImplementedException(); } - public static NetworkSession Create(NetworkSessionType sessionType, - int maxLocalGamers, int maxGamers, int privateGamerSlots, - NetworkSessionProperties sessionProperties) + public static NetworkSession Create(NetworkSessionType sessionType, int maxLocalGamers, int maxGamers, + int privateGamerSlots, NetworkSessionProperties sessionProperties) { throw new NotImplementedException(); } - public static NetworkSession Create(NetworkSessionType sessionType, - IEnumerable localGamers, int maxGamers, int privateGamerSlots, - NetworkSessionProperties sessionProperties) + public static NetworkSession Create(NetworkSessionType sessionType, IEnumerable localGamers, + int maxGamers, int privateGamerSlots, NetworkSessionProperties sessionProperties) { throw new NotImplementedException(); } - public static IAsyncResult BeginCreate(NetworkSessionType sessionType, - int maxLocalGamers, int maxGamers, AsyncCallback callback, object asyncState) + public static IAsyncResult BeginCreate(NetworkSessionType sessionType, int maxLocalGamers, int maxGamers, + AsyncCallback callback, object asyncState) { throw new NotImplementedException(); } - public static IAsyncResult BeginCreate(NetworkSessionType sessionType, - int maxLocalGamers, int maxGamers, int privateGamerSlots, - NetworkSessionProperties sessionProperties, AsyncCallback callback, - object asyncState) + public static IAsyncResult BeginCreate(NetworkSessionType sessionType, int maxLocalGamers, int maxGamers, + int privateGamerSlots, NetworkSessionProperties sessionProperties, AsyncCallback callback, object asyncState) { throw new NotImplementedException(); } - public static IAsyncResult BeginCreate(NetworkSessionType sessionType, - IEnumerable localGamers, int maxGamers, int privateGamerSlots, - NetworkSessionProperties sessionProperties, AsyncCallback callback, + public static IAsyncResult BeginCreate(NetworkSessionType sessionType, IEnumerable localGamers, + int maxGamers, int privateGamerSlots, NetworkSessionProperties sessionProperties, AsyncCallback callback, object asyncState) { throw new NotImplementedException(); @@ -292,28 +289,26 @@ namespace ANX.Framework.Net throw new NotImplementedException(); } - public static AvailableNetworkSessionCollection Find(NetworkSessionType sessionType, - int maxLocalGamers, NetworkSessionProperties searchProperties) + public static AvailableNetworkSessionCollection Find(NetworkSessionType sessionType, int maxLocalGamers, + NetworkSessionProperties searchProperties) { throw new NotImplementedException(); } public static AvailableNetworkSessionCollection Find(NetworkSessionType sessionType, - IEnumerable localGamers, NetworkSessionProperties searchProperties) + IEnumerable localGamers, NetworkSessionProperties searchProperties) { throw new NotImplementedException(); } - public static IAsyncResult BeginFind(NetworkSessionType sessionType, - int maxLocalGamers, NetworkSessionProperties searchProperties, - AsyncCallback callback, object asyncState) + public static IAsyncResult BeginFind(NetworkSessionType sessionType, int maxLocalGamers, + NetworkSessionProperties searchProperties, AsyncCallback callback, object asyncState) { throw new NotImplementedException(); } - public static IAsyncResult BeginFind(NetworkSessionType sessionType, - IEnumerable localGamers, NetworkSessionProperties searchProperties, - AsyncCallback callback, object asyncState) + public static IAsyncResult BeginFind(NetworkSessionType sessionType, IEnumerable localGamers, + NetworkSessionProperties searchProperties, AsyncCallback callback, object asyncState) { throw new NotImplementedException(); } @@ -328,8 +323,8 @@ namespace ANX.Framework.Net throw new NotImplementedException(); } - public static IAsyncResult BeginJoin(AvailableNetworkSession availableSession, - AsyncCallback callback, object asyncState) + public static IAsyncResult BeginJoin(AvailableNetworkSession availableSession, AsyncCallback callback, + object asyncState) { throw new NotImplementedException(); } @@ -349,14 +344,13 @@ namespace ANX.Framework.Net throw new NotImplementedException(); } - public static IAsyncResult BeginJoinInvited(int maxLocalGamers, - AsyncCallback callback, object asyncState) + public static IAsyncResult BeginJoinInvited(int maxLocalGamers, AsyncCallback callback, object asyncState) { throw new NotImplementedException(); } - public static IAsyncResult BeginJoinInvited(IEnumerable localGamers, - AsyncCallback callback, object asyncState) + public static IAsyncResult BeginJoinInvited(IEnumerable localGamers, AsyncCallback callback, + object asyncState) { throw new NotImplementedException(); } diff --git a/ANX.Framework/Net/NetworkSessionEndReason.cs b/ANX.Framework/Net/NetworkSessionEndReason.cs index 47ed7947..a859d418 100644 --- a/ANX.Framework/Net/NetworkSessionEndReason.cs +++ b/ANX.Framework/Net/NetworkSessionEndReason.cs @@ -1,5 +1,6 @@ #region Using Statements using System; +using ANX.Framework.NonXNA.Development; #endregion // Using Statements @@ -9,6 +10,8 @@ using System; namespace ANX.Framework.Net { + [PercentageComplete(100)] + [TestState(TestStateAttribute.TestState.Tested)] public enum NetworkSessionEndReason { ClientSignedOut, diff --git a/ANX.Framework/Net/NetworkSessionEndedEventArgs.cs b/ANX.Framework/Net/NetworkSessionEndedEventArgs.cs index 4c29910a..669a7792 100644 --- a/ANX.Framework/Net/NetworkSessionEndedEventArgs.cs +++ b/ANX.Framework/Net/NetworkSessionEndedEventArgs.cs @@ -1,4 +1,5 @@ using System; +using ANX.Framework.NonXNA.Development; // This file is part of the ANX.Framework created by the // "ANX.Framework developer group" and released under the Ms-PL license. @@ -6,17 +7,15 @@ using System; namespace ANX.Framework.Net { - public class NetworkSessionEndedEventArgs : EventArgs - { - public NetworkSessionEndReason EndReason - { - get; - private set; - } + [PercentageComplete(100)] + [TestState(TestStateAttribute.TestState.Tested)] + public class NetworkSessionEndedEventArgs : EventArgs + { + public NetworkSessionEndReason EndReason { get; private set; } - public NetworkSessionEndedEventArgs(NetworkSessionEndReason endReason) - { - EndReason = endReason; - } - } + public NetworkSessionEndedEventArgs(NetworkSessionEndReason endReason) + { + EndReason = endReason; + } + } } diff --git a/ANX.Framework/Net/NetworkSessionJoinError.cs b/ANX.Framework/Net/NetworkSessionJoinError.cs index 660af1a0..221a5b7c 100644 --- a/ANX.Framework/Net/NetworkSessionJoinError.cs +++ b/ANX.Framework/Net/NetworkSessionJoinError.cs @@ -1,5 +1,6 @@ #region Using Statements using System; +using ANX.Framework.NonXNA.Development; #endregion // Using Statements @@ -9,6 +10,8 @@ using System; namespace ANX.Framework.Net { + [PercentageComplete(100)] + [TestState(TestStateAttribute.TestState.Tested)] public enum NetworkSessionJoinError { SessionNotFound, diff --git a/ANX.Framework/Net/NetworkSessionJoinException.cs b/ANX.Framework/Net/NetworkSessionJoinException.cs index 1dc1b05f..368d7c30 100644 --- a/ANX.Framework/Net/NetworkSessionJoinException.cs +++ b/ANX.Framework/Net/NetworkSessionJoinException.cs @@ -1,5 +1,6 @@ using System; using System.Runtime.Serialization; +using ANX.Framework.NonXNA.Development; // This file is part of the ANX.Framework created by the // "ANX.Framework developer group" and released under the Ms-PL license. @@ -7,6 +8,8 @@ using System.Runtime.Serialization; namespace ANX.Framework.Net { + [PercentageComplete(0)] + [TestState(TestStateAttribute.TestState.Untested)] public class NetworkSessionJoinException : NetworkException { public NetworkSessionJoinError JoinError diff --git a/ANX.Framework/Net/NetworkSessionProperties.cs b/ANX.Framework/Net/NetworkSessionProperties.cs index e8356513..8ad20e94 100644 --- a/ANX.Framework/Net/NetworkSessionProperties.cs +++ b/ANX.Framework/Net/NetworkSessionProperties.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Collections; +using ANX.Framework.NonXNA.Development; // This file is part of the ANX.Framework created by the // "ANX.Framework developer group" and released under the Ms-PL license. @@ -8,6 +9,8 @@ using System.Collections; namespace ANX.Framework.Net { + [PercentageComplete(0)] + [TestState(TestStateAttribute.TestState.Untested)] public class NetworkSessionProperties : IList, ICollection, IEnumerable, IEnumerable { diff --git a/ANX.Framework/Net/NetworkSessionState.cs b/ANX.Framework/Net/NetworkSessionState.cs index 954bc6df..fc80b402 100644 --- a/ANX.Framework/Net/NetworkSessionState.cs +++ b/ANX.Framework/Net/NetworkSessionState.cs @@ -1,5 +1,6 @@ #region Using Statements using System; +using ANX.Framework.NonXNA.Development; #endregion // Using Statements @@ -9,6 +10,8 @@ using System; namespace ANX.Framework.Net { + [PercentageComplete(100)] + [TestState(TestStateAttribute.TestState.Tested)] public enum NetworkSessionState { Lobby, diff --git a/ANX.Framework/Net/NetworkSessionType.cs b/ANX.Framework/Net/NetworkSessionType.cs index d10c4327..2c6456b7 100644 --- a/ANX.Framework/Net/NetworkSessionType.cs +++ b/ANX.Framework/Net/NetworkSessionType.cs @@ -1,5 +1,6 @@ #region Using Statements using System; +using ANX.Framework.NonXNA.Development; #endregion // Using Statements @@ -9,6 +10,8 @@ using System; namespace ANX.Framework.Net { + [PercentageComplete(100)] + [TestState(TestStateAttribute.TestState.Tested)] public enum NetworkSessionType { Local = 0, diff --git a/ANX.Framework/Net/PacketReader.cs b/ANX.Framework/Net/PacketReader.cs index 9641ac6f..8fbf5c24 100644 --- a/ANX.Framework/Net/PacketReader.cs +++ b/ANX.Framework/Net/PacketReader.cs @@ -1,5 +1,6 @@ using System; using System.IO; +using ANX.Framework.NonXNA.Development; // This file is part of the ANX.Framework created by the // "ANX.Framework developer group" and released under the Ms-PL license. @@ -7,29 +8,22 @@ using System.IO; namespace ANX.Framework.Net { + [PercentageComplete(100)] + [TestState(TestStateAttribute.TestState.Untested)] public class PacketReader : BinaryReader { - public int Length - { - get - { - return (int)BaseStream.Length; - } - } + public int Length + { + get { return (int)BaseStream.Length; } + } - public int Position - { - get - { - return (int)BaseStream.Position; - } - set - { - BaseStream.Position = (long)value; - } - } + public int Position + { + get { return (int)BaseStream.Position; } + set { BaseStream.Position = value; } + } - public PacketReader() + public PacketReader() : this(0) { } @@ -39,16 +33,6 @@ namespace ANX.Framework.Net { } - public override float ReadSingle() - { - return ReadSingle(); - } - - public override double ReadDouble() - { - return ReadDouble(); - } - public Vector2 ReadVector2() { return new Vector2 diff --git a/ANX.Framework/Net/PacketWriter.cs b/ANX.Framework/Net/PacketWriter.cs index a7651048..115bc07e 100644 --- a/ANX.Framework/Net/PacketWriter.cs +++ b/ANX.Framework/Net/PacketWriter.cs @@ -1,5 +1,6 @@ using System; using System.IO; +using ANX.Framework.NonXNA.Development; // This file is part of the ANX.Framework created by the // "ANX.Framework developer group" and released under the Ms-PL license. @@ -7,29 +8,22 @@ using System.IO; namespace ANX.Framework.Net { + [PercentageComplete(100)] + [TestState(TestStateAttribute.TestState.Untested)] public class PacketWriter : BinaryWriter { - public int Length - { - get - { - return (int)BaseStream.Length; - } - } + public int Length + { + get { return (int)BaseStream.Length; } + } - public int Position - { - get - { - return (int)BaseStream.Position; - } - set - { - BaseStream.Position = (long)value; - } - } + public int Position + { + get { return (int)BaseStream.Position; } + set { BaseStream.Position = value; } + } - public PacketWriter() + public PacketWriter() : this(0) { } @@ -39,16 +33,6 @@ namespace ANX.Framework.Net { } - public override void Write(float value) - { - Write(value); - } - - public override void Write(double value) - { - Write(value); - } - public void Write(Vector2 value) { Write(value.X); diff --git a/ANX.Framework/Net/QualityOfService.cs b/ANX.Framework/Net/QualityOfService.cs index ff7f1531..554c3441 100644 --- a/ANX.Framework/Net/QualityOfService.cs +++ b/ANX.Framework/Net/QualityOfService.cs @@ -1,4 +1,5 @@ using System; +using ANX.Framework.NonXNA.Development; // This file is part of the ANX.Framework created by the // "ANX.Framework developer group" and released under the Ms-PL license. @@ -6,36 +7,14 @@ using System; namespace ANX.Framework.Net { - public sealed class QualityOfService - { - public bool IsAvailable - { - get; - internal set; - } - - public int BytesPerSecondUpstream - { - get; - internal set; - } - - public int BytesPerSecondDownstream - { - get; - internal set; - } - - public TimeSpan AverageRoundtripTime - { - get; - internal set; - } - - public TimeSpan MinimumRoundtripTime - { - get; - internal set; - } - } + [PercentageComplete(100)] + [TestState(TestStateAttribute.TestState.Untested)] + public sealed class QualityOfService + { + public bool IsAvailable { get; internal set; } + public int BytesPerSecondUpstream { get; internal set; } + public int BytesPerSecondDownstream { get; internal set; } + public TimeSpan AverageRoundtripTime { get; internal set; } + public TimeSpan MinimumRoundtripTime { get; internal set; } + } } diff --git a/ANX.Framework/Net/SendDataOptions.cs b/ANX.Framework/Net/SendDataOptions.cs index 8bfe917a..b747e102 100644 --- a/ANX.Framework/Net/SendDataOptions.cs +++ b/ANX.Framework/Net/SendDataOptions.cs @@ -1,5 +1,6 @@ #region Using Statements using System; +using ANX.Framework.NonXNA.Development; #endregion // Using Statements @@ -9,6 +10,8 @@ using System; namespace ANX.Framework.Net { + [PercentageComplete(100)] + [TestState(TestStateAttribute.TestState.Tested)] public enum SendDataOptions { None, diff --git a/ANX.Framework/Net/WriteLeaderboardsEventArgs.cs b/ANX.Framework/Net/WriteLeaderboardsEventArgs.cs index 00ba0bf6..f027a40a 100644 --- a/ANX.Framework/Net/WriteLeaderboardsEventArgs.cs +++ b/ANX.Framework/Net/WriteLeaderboardsEventArgs.cs @@ -1,4 +1,5 @@ using System; +using ANX.Framework.NonXNA.Development; // This file is part of the ANX.Framework created by the // "ANX.Framework developer group" and released under the Ms-PL license. @@ -6,18 +7,11 @@ using System; namespace ANX.Framework.Net { + [PercentageComplete(100)] + [TestState(TestStateAttribute.TestState.Tested)] public sealed class WriteLeaderboardsEventArgs : EventArgs { - public NetworkGamer Gamer - { - get; - internal set; - } - - public bool IsLeaving - { - get; - internal set; - } + public NetworkGamer Gamer { get; internal set; } + public bool IsLeaving { get; internal set; } } } diff --git a/Tools/OnlineStatusGenerator/Program.cs b/Tools/OnlineStatusGenerator/Program.cs index 56a082f6..37d8de4f 100644 --- a/Tools/OnlineStatusGenerator/Program.cs +++ b/Tools/OnlineStatusGenerator/Program.cs @@ -1,13 +1,17 @@ using System; using System.Collections.Generic; -using System.Reflection; using System.IO; +using System.Reflection; using ANX.Framework.NonXNA.Development; namespace OnlineStatusGenerator { class Program { + private const string GreenColor = "#A5DE94"; + private const string RedColor = "#AD0000"; + private const string YellowColor = "#FFFF9C"; + static void Main(string[] args) { var assembly = Assembly.LoadFile(Path.GetFullPath("ANX.Framework.dll")); @@ -34,21 +38,9 @@ namespace OnlineStatusGenerator foreach (Type type in namespaces[space]) { result += "\n" + type.Name + ""; - object[] percentageAttributes = type.GetCustomAttributes(typeof(PercentageCompleteAttribute), false); - var percentageAttribute = percentageAttributes.Length > 0 ? - percentageAttributes[0] as PercentageCompleteAttribute : null; - result += "" + (percentageAttribute != null ? percentageAttribute.Percentage.ToString() : "---") + ""; - - object[] developerAttributes = type.GetCustomAttributes(typeof(DeveloperAttribute), false); - var developerAttribute = developerAttributes.Length > 0 ? - developerAttributes[0] as DeveloperAttribute : null; - result += "" + (developerAttribute != null ? developerAttribute.Developer : "---") + ""; - - object[] testAttributes = type.GetCustomAttributes(typeof(TestStateAttribute), false); - var testAttribute = testAttributes.Length > 0 ? - testAttributes[0] as TestStateAttribute : null; - result += "" + (testAttribute != null ? testAttribute.State.ToString() : "---") + ""; - + result += GetPercentageCompleteBox(type); + result += GetDeveloperBox(type); + result += GetTestStateBox(type); result += ""; } } @@ -57,5 +49,38 @@ namespace OnlineStatusGenerator File.WriteAllText("Report.html", result); System.Diagnostics.Process.Start("Report.html"); } + + private static string GetPercentageCompleteBox(Type type) + { + var percentageAttribute = GetAttribute(type); + int percent = percentageAttribute != null ? percentageAttribute.Percentage : -1; + string result = percent != -1 ? percent.ToString() : "---"; + string bgColor = percent == -1 ? RedColor : (percent == 100 ? GreenColor : YellowColor); + return "" + result + ""; + } + + private static string GetTestStateBox(Type type) + { + var testAttribute = GetAttribute(type); + string result = testAttribute != null ? testAttribute.State.ToString() : "---"; + string bgColor = testAttribute == null ? RedColor : + (testAttribute.State == TestStateAttribute.TestState.Tested ? GreenColor : YellowColor); + return "" + result + ""; + } + + private static string GetDeveloperBox(Type type) + { + var developerAttribute = GetAttribute(type); + string result = developerAttribute != null ? developerAttribute.Developer : "---"; + string bgColor = developerAttribute == null ? RedColor : + (developerAttribute.Developer != "???" ? "white" : YellowColor); + return "" + result + ""; + } + + private static T GetAttribute(Type type) where T : Attribute + { + object[] attributes = type.GetCustomAttributes(typeof(T), false); + return attributes.Length > 0 ? attributes[0] as T : null; + } } }