Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ValidateCopyParameters()

static void Microsoft.Xna.Framework.Helpers.ValidateCopyParameters ( int dataLength,
int dataIndex,
int elementCount )
inlinestatic

Definition at line 66 of file Helpers.cs.

67 {
68 if (dataIndex < 0 || dataIndex > dataLength)
69 {
70 throw new ArgumentOutOfRangeException("dataIndex", FrameworkResources.MustBeValidIndex);
71 }
72 if (elementCount + dataIndex > dataLength)
73 {
74 throw new ArgumentOutOfRangeException("elementCount", FrameworkResources.MustBeValidIndex);
75 }
76 if (elementCount <= 0)
77 {
78 throw new ArgumentOutOfRangeException("elementCount", FrameworkResources.MustBeValidIndex);
79 }
80 }

References Microsoft.Xna.Framework.FrameworkResources.MustBeValidIndex.

Referenced by Microsoft.Xna.Framework.Graphics.TextureCube.CopyData< T >(), Microsoft.Xna.Framework.Graphics.Texture3D.CopyData< T >(), Microsoft.Xna.Framework.Graphics.Texture2D.CopyData< T >(), Microsoft.Xna.Framework.Graphics.VertexBuffer.CopyData< T >(), Microsoft.Xna.Framework.Graphics.IndexBuffer.CopyData< T >(), and Microsoft.Xna.Framework.Graphics.GraphicsDevice.GetBackBufferData< T >().