Added a lot of Developer attributes and added some colors to the OnlineStatusGenerator

This commit is contained in:
SND\AstrorEnales_cp 2012-10-10 16:07:28 +00:00 committed by Konstantin Koch
parent 82b717c008
commit c0e2f85eae
57 changed files with 450 additions and 494 deletions

View File

@ -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

View File

@ -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");
}

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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(); }
}
}
}

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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; }
}
}

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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; }
}
}

View File

@ -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; }
}
}

View File

@ -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,

View File

@ -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
{

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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;

View File

@ -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
{

View File

@ -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,

View File

@ -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; }
}
}

View File

@ -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<AvailableNetworkSession>, IDisposable
{

View File

@ -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
{
}
}

View File

@ -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
{
}
}

View File

@ -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;
}
}
}

View File

@ -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;
}
}
}

View File

@ -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;
}
}
}

View File

@ -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

View File

@ -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)
{
}

View File

@ -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

View File

@ -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<NetworkGamer> Gamers

View File

@ -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<SignedInGamer> localGamers, int maxGamers, int privateGamerSlots,
NetworkSessionProperties sessionProperties)
public static NetworkSession Create(NetworkSessionType sessionType, IEnumerable<SignedInGamer> 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<SignedInGamer> localGamers, int maxGamers, int privateGamerSlots,
NetworkSessionProperties sessionProperties, AsyncCallback callback,
public static IAsyncResult BeginCreate(NetworkSessionType sessionType, IEnumerable<SignedInGamer> 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<SignedInGamer> localGamers, NetworkSessionProperties searchProperties)
IEnumerable<SignedInGamer> 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<SignedInGamer> localGamers, NetworkSessionProperties searchProperties,
AsyncCallback callback, object asyncState)
public static IAsyncResult BeginFind(NetworkSessionType sessionType, IEnumerable<SignedInGamer> 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<SignedInGamer> localGamers,
AsyncCallback callback, object asyncState)
public static IAsyncResult BeginJoinInvited(IEnumerable<SignedInGamer> localGamers, AsyncCallback callback,
object asyncState)
{
throw new NotImplementedException();
}

View File

@ -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,

View File

@ -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;
}
}
}

View File

@ -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,

View File

@ -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

View File

@ -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<int?>, ICollection<int?>,
IEnumerable<int?>, IEnumerable
{

View File

@ -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,

View File

@ -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,

View File

@ -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

View File

@ -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);

View File

@ -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; }
}
}

View File

@ -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,

View File

@ -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; }
}
}

View File

@ -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<tr><td>" + type.Name + "</td>";
object[] percentageAttributes = type.GetCustomAttributes(typeof(PercentageCompleteAttribute), false);
var percentageAttribute = percentageAttributes.Length > 0 ?
percentageAttributes[0] as PercentageCompleteAttribute : null;
result += "<td align=center>" + (percentageAttribute != null ? percentageAttribute.Percentage.ToString() : "---") + "</td>";
object[] developerAttributes = type.GetCustomAttributes(typeof(DeveloperAttribute), false);
var developerAttribute = developerAttributes.Length > 0 ?
developerAttributes[0] as DeveloperAttribute : null;
result += "<td align=center>" + (developerAttribute != null ? developerAttribute.Developer : "---") + "</td>";
object[] testAttributes = type.GetCustomAttributes(typeof(TestStateAttribute), false);
var testAttribute = testAttributes.Length > 0 ?
testAttributes[0] as TestStateAttribute : null;
result += "<td align=center>" + (testAttribute != null ? testAttribute.State.ToString() : "---") + "</td>";
result += GetPercentageCompleteBox(type);
result += GetDeveloperBox(type);
result += GetTestStateBox(type);
result += "</tr>";
}
}
@ -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<PercentageCompleteAttribute>(type);
int percent = percentageAttribute != null ? percentageAttribute.Percentage : -1;
string result = percent != -1 ? percent.ToString() : "---";
string bgColor = percent == -1 ? RedColor : (percent == 100 ? GreenColor : YellowColor);
return "<td align=\"center\" style=\"background-color:" + bgColor + ";\">" + result + "</td>";
}
private static string GetTestStateBox(Type type)
{
var testAttribute = GetAttribute<TestStateAttribute>(type);
string result = testAttribute != null ? testAttribute.State.ToString() : "---";
string bgColor = testAttribute == null ? RedColor :
(testAttribute.State == TestStateAttribute.TestState.Tested ? GreenColor : YellowColor);
return "<td align=\"center\" style=\"background-color:" + bgColor + ";\">" + result + "</td>";
}
private static string GetDeveloperBox(Type type)
{
var developerAttribute = GetAttribute<DeveloperAttribute>(type);
string result = developerAttribute != null ? developerAttribute.Developer : "---";
string bgColor = developerAttribute == null ? RedColor :
(developerAttribute.Developer != "???" ? "white" : YellowColor);
return "<td align=\"center\" style=\"background-color:" + bgColor + ";\">" + result + "</td>";
}
private static T GetAttribute<T>(Type type) where T : Attribute
{
object[] attributes = type.GetCustomAttributes(typeof(T), false);
return attributes.Length > 0 ? attributes[0] as T : null;
}
}
}