Add SDL2 renderer based on SDL2# wrapper. Closes #3315.
SDL2# binary was built from commit 70af91f84493a924a3c1da46ae6209bb5f7222e3.
This commit is contained in:
68
OpenRA.Renderer.Sdl2/OpenRA.Renderer.Sdl2.csproj
Normal file
68
OpenRA.Renderer.Sdl2/OpenRA.Renderer.Sdl2.csproj
Normal file
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>10.0.0</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{33D03738-C154-4028-8EA8-63A3C488A651}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>OpenRA.Renderer.Sdl2</RootNamespace>
|
||||
<AssemblyName>OpenRA.Renderer.Sdl2</AssemblyName>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>True</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>False</Optimize>
|
||||
<OutputPath>..\</OutputPath>
|
||||
<DefineConstants>DEBUG;</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<ConsolePause>False</ConsolePause>
|
||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>none</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||
<ConsolePause>False</ConsolePause>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="Tao.OpenGl">
|
||||
<HintPath>..\thirdparty\Tao\Tao.OpenGl.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="SDL2#">
|
||||
<HintPath>..\thirdparty\SDL2#.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Sdl2Input.cs" />
|
||||
<Compile Include="Sdl2GraphicsDevice.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\OpenRA.FileFormats\OpenRA.FileFormats.csproj">
|
||||
<Project>{BDAEAB25-991E-46A7-AF1E-4F0E03358DAA}</Project>
|
||||
<Name>OpenRA.FileFormats</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\OpenRA.Game\OpenRA.Game.csproj">
|
||||
<Project>{0DFB103F-2962-400F-8C6D-E2C28CCBA633}</Project>
|
||||
<Name>OpenRA.Game</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\OpenRA.Renderer.SdlCommon\OpenRA.Renderer.SdlCommon.csproj">
|
||||
<Project>{52FD9F0B-B209-4ED7-8A32-AC8033363263}</Project>
|
||||
<Name>OpenRA.Renderer.SdlCommon</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\OpenRA.Renderer.Gl\OpenRA.Renderer.Gl.csproj">
|
||||
<Project>{E9C01A96-C3E2-4772-825B-A740AC513D31}</Project>
|
||||
<Name>OpenRA.Renderer.Gl</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
219
OpenRA.Renderer.Sdl2/Sdl2GraphicsDevice.cs
Executable file
219
OpenRA.Renderer.Sdl2/Sdl2GraphicsDevice.cs
Executable file
@@ -0,0 +1,219 @@
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* available to you under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation. For more information,
|
||||
* see COPYING.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using OpenRA.FileFormats.Graphics;
|
||||
using OpenRA.Renderer.Glsl;
|
||||
using OpenRA.Renderer.SdlCommon;
|
||||
using SDL2;
|
||||
using Tao.OpenGl;
|
||||
|
||||
[assembly: Renderer(typeof(OpenRA.Renderer.Sdl2.DeviceFactory))]
|
||||
|
||||
namespace OpenRA.Renderer.Sdl2
|
||||
{
|
||||
public class DeviceFactory : IDeviceFactory
|
||||
{
|
||||
public IGraphicsDevice Create(Size size, WindowMode windowMode)
|
||||
{
|
||||
Console.WriteLine("Using SDL2 renderer");
|
||||
return new Sdl2GraphicsDevice(size, windowMode);
|
||||
}
|
||||
}
|
||||
|
||||
public class Sdl2GraphicsDevice : IGraphicsDevice
|
||||
{
|
||||
static string[] requiredExtensions =
|
||||
{
|
||||
"GL_ARB_vertex_shader",
|
||||
"GL_ARB_fragment_shader",
|
||||
"GL_ARB_vertex_buffer_object",
|
||||
"GL_EXT_framebuffer_object"
|
||||
};
|
||||
|
||||
Size size;
|
||||
Sdl2Input input;
|
||||
IntPtr window;
|
||||
|
||||
public Size WindowSize { get { return size; } }
|
||||
|
||||
public Sdl2GraphicsDevice(Size windowSize, WindowMode windowMode)
|
||||
{
|
||||
size = windowSize;
|
||||
|
||||
SDL.SDL_Init(SDL.SDL_INIT_NOPARACHUTE | SDL.SDL_INIT_VIDEO);
|
||||
SDL.SDL_GL_SetAttribute(SDL.SDL_GLattr.SDL_GL_DOUBLEBUFFER, 1);
|
||||
SDL.SDL_GL_SetAttribute(SDL.SDL_GLattr.SDL_GL_RED_SIZE, 8);
|
||||
SDL.SDL_GL_SetAttribute(SDL.SDL_GLattr.SDL_GL_GREEN_SIZE, 8);
|
||||
SDL.SDL_GL_SetAttribute(SDL.SDL_GLattr.SDL_GL_BLUE_SIZE, 8);
|
||||
SDL.SDL_GL_SetAttribute(SDL.SDL_GLattr.SDL_GL_ALPHA_SIZE, 0);
|
||||
|
||||
var windowFlags = SDL.SDL_WindowFlags.SDL_WINDOW_OPENGL;
|
||||
if (windowMode == WindowMode.Fullscreen)
|
||||
windowFlags |= SDL.SDL_WindowFlags.SDL_WINDOW_FULLSCREEN;
|
||||
else if (windowMode == WindowMode.PseudoFullscreen)
|
||||
{
|
||||
windowFlags |= SDL.SDL_WindowFlags.SDL_WINDOW_FULLSCREEN_DESKTOP;
|
||||
Environment.SetEnvironmentVariable("SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS", "0");
|
||||
}
|
||||
|
||||
SDL.SDL_DisplayMode display;
|
||||
SDL.SDL_GetCurrentDisplayMode(0, out display);
|
||||
|
||||
Console.WriteLine("Desktop resolution: {0}x{1}", display.w, display.h);
|
||||
if (size.Width == 0 && size.Height == 0)
|
||||
{
|
||||
Console.WriteLine("No custom resolution provided, using desktop resolution");
|
||||
size = new Size(display.w, display.h);
|
||||
}
|
||||
|
||||
Console.WriteLine("Using resolution: {0}x{1}", size.Width, size.Height);
|
||||
|
||||
window = SDL.SDL_CreateWindow("OpenRA", SDL.SDL_WINDOWPOS_CENTERED, SDL.SDL_WINDOWPOS_CENTERED, size.Width, size.Height, windowFlags);
|
||||
|
||||
SDL.SDL_ShowCursor(0);
|
||||
SDL.SDL_GL_CreateContext(window);
|
||||
ErrorHandler.CheckGlError();
|
||||
|
||||
var extensions = Gl.glGetString(Gl.GL_EXTENSIONS);
|
||||
if (extensions == null)
|
||||
Console.WriteLine("Failed to fetch GL_EXTENSIONS, this is bad.");
|
||||
|
||||
var missingExtensions = requiredExtensions.Where(r => !extensions.Contains(r)).ToArray();
|
||||
if (missingExtensions.Any())
|
||||
{
|
||||
ErrorHandler.WriteGraphicsLog("Unsupported GPU: Missing extensions: {0}".F(missingExtensions.JoinWith(",")));
|
||||
throw new InvalidProgramException("Unsupported GPU. See graphics.log for details.");
|
||||
}
|
||||
|
||||
Gl.glEnableClientState(Gl.GL_VERTEX_ARRAY);
|
||||
ErrorHandler.CheckGlError();
|
||||
Gl.glEnableClientState(Gl.GL_TEXTURE_COORD_ARRAY);
|
||||
ErrorHandler.CheckGlError();
|
||||
|
||||
SDL.SDL_SetModState(0);
|
||||
input = new Sdl2Input();
|
||||
}
|
||||
|
||||
public virtual void Quit()
|
||||
{
|
||||
SDL.SDL_Quit();
|
||||
}
|
||||
|
||||
int ModeFromPrimitiveType(PrimitiveType pt)
|
||||
{
|
||||
switch (pt)
|
||||
{
|
||||
case PrimitiveType.PointList: return Gl.GL_POINTS;
|
||||
case PrimitiveType.LineList: return Gl.GL_LINES;
|
||||
case PrimitiveType.TriangleList: return Gl.GL_TRIANGLES;
|
||||
case PrimitiveType.QuadList: return Gl.GL_QUADS;
|
||||
}
|
||||
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void DrawPrimitives(PrimitiveType pt, int firstVertex, int numVertices)
|
||||
{
|
||||
Gl.glDrawArrays(ModeFromPrimitiveType(pt), firstVertex, numVertices);
|
||||
ErrorHandler.CheckGlError();
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
Gl.glClearColor(0, 0, 0, 0);
|
||||
ErrorHandler.CheckGlError();
|
||||
Gl.glClear(Gl.GL_COLOR_BUFFER_BIT);
|
||||
ErrorHandler.CheckGlError();
|
||||
}
|
||||
|
||||
public void EnableDepthBuffer()
|
||||
{
|
||||
Gl.glClear(Gl.GL_DEPTH_BUFFER_BIT);
|
||||
ErrorHandler.CheckGlError();
|
||||
Gl.glEnable(Gl.GL_DEPTH_TEST);
|
||||
ErrorHandler.CheckGlError();
|
||||
}
|
||||
|
||||
public void DisableDepthBuffer()
|
||||
{
|
||||
Gl.glDisable(Gl.GL_DEPTH_TEST);
|
||||
ErrorHandler.CheckGlError();
|
||||
}
|
||||
|
||||
public void SetBlendMode(BlendMode mode)
|
||||
{
|
||||
Gl.glBlendEquation(Gl.GL_FUNC_ADD);
|
||||
ErrorHandler.CheckGlError();
|
||||
|
||||
switch (mode)
|
||||
{
|
||||
case BlendMode.None:
|
||||
Gl.glDisable(Gl.GL_BLEND);
|
||||
break;
|
||||
case BlendMode.Alpha:
|
||||
Gl.glEnable(Gl.GL_BLEND);
|
||||
ErrorHandler.CheckGlError();
|
||||
Gl.glBlendFunc(Gl.GL_SRC_ALPHA, Gl.GL_ONE_MINUS_SRC_ALPHA);
|
||||
break;
|
||||
case BlendMode.Additive:
|
||||
Gl.glEnable(Gl.GL_BLEND);
|
||||
ErrorHandler.CheckGlError();
|
||||
Gl.glBlendFunc(Gl.GL_ONE, Gl.GL_ONE);
|
||||
break;
|
||||
case BlendMode.Subtractive:
|
||||
Gl.glEnable(Gl.GL_BLEND);
|
||||
ErrorHandler.CheckGlError();
|
||||
Gl.glBlendFunc(Gl.GL_ONE, Gl.GL_ONE);
|
||||
ErrorHandler.CheckGlError();
|
||||
Gl.glBlendEquation(Gl.GL_FUNC_REVERSE_SUBTRACT);
|
||||
break;
|
||||
}
|
||||
|
||||
ErrorHandler.CheckGlError();
|
||||
}
|
||||
|
||||
public void EnableScissor(int left, int top, int width, int height)
|
||||
{
|
||||
if (width < 0)
|
||||
width = 0;
|
||||
|
||||
if (height < 0)
|
||||
height = 0;
|
||||
|
||||
Gl.glScissor(left, size.Height - (top + height), width, height);
|
||||
ErrorHandler.CheckGlError();
|
||||
Gl.glEnable(Gl.GL_SCISSOR_TEST);
|
||||
ErrorHandler.CheckGlError();
|
||||
}
|
||||
|
||||
public void DisableScissor()
|
||||
{
|
||||
Gl.glDisable(Gl.GL_SCISSOR_TEST);
|
||||
ErrorHandler.CheckGlError();
|
||||
}
|
||||
|
||||
public void SetLineWidth(float width)
|
||||
{
|
||||
Gl.glLineWidth(width);
|
||||
ErrorHandler.CheckGlError();
|
||||
}
|
||||
|
||||
public void Present() { SDL.SDL_GL_SwapWindow(window); }
|
||||
public void PumpInput(IInputHandler inputHandler) { input.PumpInput(inputHandler); }
|
||||
public IVertexBuffer<Vertex> CreateVertexBuffer(int size) { return new VertexBuffer<Vertex>(size); }
|
||||
public ITexture CreateTexture() { return new Texture(); }
|
||||
public ITexture CreateTexture(Bitmap bitmap) { return new Texture(bitmap); }
|
||||
public IFrameBuffer CreateFrameBuffer(Size s) { return new FrameBuffer(s); }
|
||||
public IShader CreateShader(string name) { return new Shader(name); }
|
||||
}
|
||||
}
|
||||
200
OpenRA.Renderer.Sdl2/Sdl2Input.cs
Normal file
200
OpenRA.Renderer.Sdl2/Sdl2Input.cs
Normal file
@@ -0,0 +1,200 @@
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* available to you under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation. For more information,
|
||||
* see COPYING.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using OpenRA.Renderer.SdlCommon;
|
||||
using SDL2;
|
||||
|
||||
namespace OpenRA.Renderer.Sdl2
|
||||
{
|
||||
public class Sdl2Input
|
||||
{
|
||||
MouseButton lastButtonBits = (MouseButton)0;
|
||||
|
||||
MouseButton MakeButton(byte b)
|
||||
{
|
||||
return b == SDL.SDL_BUTTON_LEFT ? MouseButton.Left
|
||||
: b == SDL.SDL_BUTTON_RIGHT ? MouseButton.Right
|
||||
: b == SDL.SDL_BUTTON_MIDDLE ? MouseButton.Middle
|
||||
: 0;
|
||||
}
|
||||
|
||||
Modifiers MakeModifiers(int raw)
|
||||
{
|
||||
return ((raw & (int)SDL.SDL_Keymod.KMOD_ALT) != 0 ? Modifiers.Alt : 0)
|
||||
| ((raw & (int)SDL.SDL_Keymod.KMOD_CTRL) != 0 ? Modifiers.Ctrl : 0)
|
||||
| ((raw & (int)SDL.SDL_Keymod.KMOD_LGUI) != 0 ? Modifiers.Meta : 0)
|
||||
| ((raw & (int)SDL.SDL_Keymod.KMOD_RGUI) != 0 ? Modifiers.Meta : 0)
|
||||
| ((raw & (int)SDL.SDL_Keymod.KMOD_SHIFT) != 0 ? Modifiers.Shift : 0);
|
||||
}
|
||||
|
||||
public void PumpInput(IInputHandler inputHandler)
|
||||
{
|
||||
var mods = MakeModifiers((int)SDL.SDL_GetModState());
|
||||
inputHandler.ModifierKeys(mods);
|
||||
MouseInput? pendingMotion = null;
|
||||
|
||||
SDL.SDL_Event e;
|
||||
while (SDL.SDL_PollEvent(out e) != 0)
|
||||
{
|
||||
switch (e.type)
|
||||
{
|
||||
case SDL.SDL_EventType.SDL_QUIT:
|
||||
OpenRA.Game.Exit();
|
||||
break;
|
||||
|
||||
case SDL.SDL_EventType.SDL_WINDOWEVENT:
|
||||
{
|
||||
switch (e.window.windowEvent)
|
||||
{
|
||||
case SDL.SDL_WindowEventID.SDL_WINDOWEVENT_FOCUS_LOST:
|
||||
Game.HasInputFocus = false;
|
||||
break;
|
||||
|
||||
case SDL.SDL_WindowEventID.SDL_WINDOWEVENT_FOCUS_GAINED:
|
||||
Game.HasInputFocus = true;
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case SDL.SDL_EventType.SDL_MOUSEBUTTONDOWN:
|
||||
{
|
||||
if (pendingMotion != null)
|
||||
{
|
||||
inputHandler.OnMouseInput(pendingMotion.Value);
|
||||
pendingMotion = null;
|
||||
}
|
||||
|
||||
var button = MakeButton(e.button.button);
|
||||
lastButtonBits |= button;
|
||||
|
||||
var pos = new int2(e.button.x, e.button.y);
|
||||
|
||||
inputHandler.OnMouseInput(new MouseInput(
|
||||
MouseInputEvent.Down, button, pos, mods,
|
||||
MultiTapDetection.DetectFromMouse(e.button.button, pos)));
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case SDL.SDL_EventType.SDL_MOUSEBUTTONUP:
|
||||
{
|
||||
if (pendingMotion != null)
|
||||
{
|
||||
inputHandler.OnMouseInput(pendingMotion.Value);
|
||||
pendingMotion = null;
|
||||
}
|
||||
|
||||
var button = MakeButton(e.button.button);
|
||||
lastButtonBits &= ~button;
|
||||
|
||||
var pos = new int2(e.button.x, e.button.y);
|
||||
inputHandler.OnMouseInput(new MouseInput(
|
||||
MouseInputEvent.Up, button, pos, mods,
|
||||
MultiTapDetection.InfoFromMouse(e.button.button)));
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case SDL.SDL_EventType.SDL_MOUSEMOTION:
|
||||
{
|
||||
pendingMotion = new MouseInput(
|
||||
MouseInputEvent.Move, lastButtonBits,
|
||||
new int2(e.motion.x, e.motion.y), mods, 0);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case SDL.SDL_EventType.SDL_MOUSEWHEEL:
|
||||
{
|
||||
// Retain compatibility with existing bogus behavior
|
||||
// TODO: Implement real scroll behavior after we drop SDL 1.2 support
|
||||
if (e.wheel.y == 0)
|
||||
break;
|
||||
|
||||
int x, y;
|
||||
SDL.SDL_GetMouseState(out x, out y);
|
||||
var button = e.wheel.y < 0 ? MouseButton.WheelDown : MouseButton.WheelUp;
|
||||
inputHandler.OnMouseInput(new MouseInput(MouseInputEvent.Down, button, new int2(x, y), Modifiers.None, 0));
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case SDL.SDL_EventType.SDL_TEXTINPUT:
|
||||
{
|
||||
string input;
|
||||
unsafe
|
||||
{
|
||||
var data = new byte[SDL.SDL_TEXTINPUTEVENT_TEXT_SIZE];
|
||||
var i = 0;
|
||||
for (; i < SDL.SDL_TEXTINPUTEVENT_TEXT_SIZE; i++)
|
||||
{
|
||||
var b = e.text.text[i];
|
||||
if (b == '\0')
|
||||
break;
|
||||
|
||||
data[i] = b;
|
||||
}
|
||||
|
||||
input = Encoding.UTF8.GetString(data, 0, i);
|
||||
}
|
||||
|
||||
inputHandler.OnTextInput(input);
|
||||
break;
|
||||
}
|
||||
|
||||
case SDL.SDL_EventType.SDL_KEYDOWN:
|
||||
case SDL.SDL_EventType.SDL_KEYUP:
|
||||
{
|
||||
var keyCode = (Keycode)e.key.keysym.sym;
|
||||
var type = e.type == SDL.SDL_EventType.SDL_KEYDOWN ?
|
||||
KeyInputEvent.Down : KeyInputEvent.Up;
|
||||
|
||||
var tapCount = e.type == SDL.SDL_EventType.SDL_KEYDOWN ?
|
||||
MultiTapDetection.DetectFromKeyboard(keyCode) :
|
||||
MultiTapDetection.InfoFromKeyboard(keyCode);
|
||||
|
||||
var keyEvent = new KeyInput
|
||||
{
|
||||
Event = type,
|
||||
Key = keyCode,
|
||||
Modifiers = mods,
|
||||
UnicodeChar = (char)e.key.keysym.sym,
|
||||
MultiTapCount = tapCount
|
||||
};
|
||||
|
||||
// Special case workaround for windows users
|
||||
if (e.key.keysym.sym == SDL.SDL_Keycode.SDLK_F4 && mods.HasModifier(Modifiers.Alt) &&
|
||||
Platform.CurrentPlatform == PlatformType.Windows)
|
||||
{
|
||||
OpenRA.Game.Exit();
|
||||
}
|
||||
else
|
||||
inputHandler.OnKeyInput(keyEvent);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (pendingMotion != null)
|
||||
{
|
||||
inputHandler.OnMouseInput(pendingMotion.Value);
|
||||
pendingMotion = null;
|
||||
}
|
||||
|
||||
ErrorHandler.CheckGlError();
|
||||
}
|
||||
}
|
||||
}
|
||||
344
OpenRA.Renderer.Sdl2/Settings.StyleCop
Normal file
344
OpenRA.Renderer.Sdl2/Settings.StyleCop
Normal file
@@ -0,0 +1,344 @@
|
||||
<StyleCopSettings Version="105">
|
||||
<Analyzers>
|
||||
<Analyzer AnalyzerId="StyleCop.CSharp.DocumentationRules">
|
||||
<Rules>
|
||||
<Rule Name="ElementsMustBeDocumented">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="PartialElementsMustBeDocumented">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="EnumerationItemsMustBeDocumented">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="DocumentationMustContainValidXml">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ElementDocumentationMustHaveSummary">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="PartialElementDocumentationMustHaveSummary">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ElementDocumentationMustHaveSummaryText">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="PartialElementDocumentationMustHaveSummaryText">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ElementDocumentationMustNotHaveDefaultSummary">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ElementParametersMustBeDocumented">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ElementParameterDocumentationMustMatchElementParameters">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ElementParameterDocumentationMustDeclareParameterName">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ElementParameterDocumentationMustHaveText">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ElementReturnValueMustBeDocumented">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ElementReturnValueDocumentationMustHaveText">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="VoidReturnValueMustNotBeDocumented">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="GenericTypeParametersMustBeDocumented">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="GenericTypeParametersMustBeDocumentedPartialClass">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="GenericTypeParameterDocumentationMustMatchTypeParameters">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="GenericTypeParameterDocumentationMustDeclareParameterName">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="GenericTypeParameterDocumentationMustHaveText">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="PropertySummaryDocumentationMustMatchAccessors">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="PropertySummaryDocumentationMustOmitSetAccessorWithRestrictedAccess">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ElementDocumentationMustNotBeCopiedAndPasted">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="SingleLineCommentsMustNotUseDocumentationStyleSlashes">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="DocumentationTextMustNotBeEmpty">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="DocumentationTextMustContainWhitespace">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="DocumentationMustMeetCharacterPercentage">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ConstructorSummaryDocumentationMustBeginWithStandardText">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="DestructorSummaryDocumentationMustBeginWithStandardText">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="DocumentationHeadersMustNotContainBlankLines">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="IncludedDocumentationXPathDoesNotExist">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="IncludeNodeDoesNotContainValidFileAndPath">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="InheritDocMustBeUsedWithInheritingClass">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ElementDocumentationMustBeSpelledCorrectly">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="FileMustHaveHeader">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="FileHeaderMustShowCopyright">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="FileHeaderMustHaveCopyrightText">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="FileHeaderMustContainFileName">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="FileHeaderFileNameDocumentationMustMatchFileName">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="FileHeaderMustHaveValidCompanyText">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="FileHeaderFileNameDocumentationMustMatchTypeName">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
</Rules>
|
||||
<AnalyzerSettings />
|
||||
</Analyzer>
|
||||
<Analyzer AnalyzerId="StyleCop.CSharp.SpacingRules">
|
||||
<Rules>
|
||||
<Rule Name="TabsMustNotBeUsed">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
</Rules>
|
||||
<AnalyzerSettings />
|
||||
</Analyzer>
|
||||
<Analyzer AnalyzerId="StyleCop.CSharp.LayoutRules">
|
||||
<Rules>
|
||||
<Rule Name="CurlyBracketsForMultiLineStatementsMustNotShareLine">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="StatementMustNotBeOnSingleLine">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ElementMustNotBeOnSingleLine">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="CurlyBracketsMustNotBeOmitted">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ElementsMustBeSeparatedByBlankLine">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
</Rules>
|
||||
<AnalyzerSettings />
|
||||
</Analyzer>
|
||||
<Analyzer AnalyzerId="StyleCop.CSharp.OrderingRules">
|
||||
<Rules>
|
||||
<Rule Name="UsingDirectivesMustBePlacedWithinNamespace">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ElementsMustAppearInTheCorrectOrder">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ElementsMustBeOrderedByAccess">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
</Rules>
|
||||
<AnalyzerSettings />
|
||||
</Analyzer>
|
||||
<Analyzer AnalyzerId="StyleCop.CSharp.ReadabilityRules">
|
||||
<Rules>
|
||||
<Rule Name="CodeMustNotContainMultipleStatementsOnOneLine">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="UseStringEmptyForEmptyStrings">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="PrefixLocalCallsWithThis">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="PrefixCallsCorrectly">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ParametersMustBeOnSameLineOrSeparateLines">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ParameterMustFollowComma">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="SplitParametersMustStartOnLineAfterDeclaration">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
</Rules>
|
||||
<AnalyzerSettings />
|
||||
</Analyzer>
|
||||
<Analyzer AnalyzerId="StyleCop.CSharp.MaintainabilityRules">
|
||||
<Rules>
|
||||
<Rule Name="AccessModifierMustBeDeclared">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="FieldsMustBePrivate">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="FileMayOnlyContainASingleClass">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
<Rule Name="ArithmeticExpressionsMustDeclarePrecedence">
|
||||
<RuleSettings>
|
||||
<BooleanProperty Name="Enabled">False</BooleanProperty>
|
||||
</RuleSettings>
|
||||
</Rule>
|
||||
</Rules>
|
||||
<AnalyzerSettings />
|
||||
</Analyzer>
|
||||
</Analyzers>
|
||||
</StyleCopSettings>
|
||||
Reference in New Issue
Block a user