110 строки
3.8 KiB
XML
110 строки
3.8 KiB
XML
<?xml version="1.0"?>
|
|
<doc>
|
|
<assembly>
|
|
<name>Gendarme.Rules.Ui</name>
|
|
</assembly>
|
|
<members>
|
|
<member name="T:Gendarme.Rules.UI.AddMatchingArrangeMeasureOverrideRule">
|
|
<summary>
|
|
An object that inherits from System.Windows.FrameworkElement and provides either
|
|
an ArrangeOverride or MeasureOverride method should also provide the other.
|
|
</summary>
|
|
<example>
|
|
Bad example:
|
|
<code>
|
|
class BadClass : System.Windows.FrameworkElement {
|
|
protected override Size MeasureOverride (Size availableSize)
|
|
{
|
|
}
|
|
}
|
|
</code></example>
|
|
<example>
|
|
Good example:
|
|
<code>
|
|
class GoodClass : System.Windows.FrameworkElement {
|
|
protected override Size MeasureOverride (Size availableSize)
|
|
{
|
|
}
|
|
protected override Size ArrangeOverride (Size finalSize)
|
|
{
|
|
}
|
|
}
|
|
</code></example>
|
|
</member>
|
|
<member name="T:Gendarme.Rules.UI.GtkSharpExecutableTargetRule">
|
|
<summary>
|
|
An executable assembly, i.e. an .exe, refers to the gtk-sharp assembly but isn't
|
|
compiled using <c>-target:winexe</c>. A console window will be created and shown
|
|
under Windows (MS runtime) when the application is executed.
|
|
</summary>
|
|
<example>
|
|
Bad example:
|
|
<c>gmcs gtk.cs -pkg:gtk-sharp</c></example>
|
|
<example>
|
|
Good example:
|
|
<c>gmcs gtk.cs -pkg:gtk-sharp -target:winexe</c></example>
|
|
</member>
|
|
<member name="T:Gendarme.Rules.UI.SystemWindowsFormsExecutableTargetRule">
|
|
<summary>
|
|
An executable assembly, i.e. an .exe, refers to the System.Windows.Forms assembly
|
|
but isn't compiled using <c>-target:winexe</c>. A console window will be created
|
|
and shown under Windows (MS runtime) when the application is executed which is
|
|
probably not desirable for a winforms application.
|
|
</summary>
|
|
<example>
|
|
Bad example:
|
|
<c>gmcs swf.cs -pkg:dotnet</c></example>
|
|
<example>
|
|
Good example:
|
|
<c>gmcs swf.cs -pkg:dotnet -target:winexe</c></example>
|
|
</member>
|
|
<member name="T:Gendarme.Rules.UI.UseSTAThreadAttributeOnSWFEntryPointsRule">
|
|
<summary>
|
|
This rule checks executable assemblies, i.e. *.exe's, that reference
|
|
System.Windows.Forms to
|
|
ensure that their entry point is decorated with <c>[System.STAThread]</c> attribute
|
|
and is not decorated with <c>[System.MTAThread]</c> attribute to ensure that Windows
|
|
Forms work properly.
|
|
</summary>
|
|
<example>
|
|
Bad example #1 (no attributes):
|
|
<code>
|
|
public class WindowsFormsEntryPoint {
|
|
static void Main ()
|
|
{
|
|
}
|
|
}
|
|
</code></example>
|
|
<example>
|
|
Bad example #2 (MTAThread)
|
|
<code>
|
|
public class WindowsFormsEntryPoint {
|
|
[MTAThread]
|
|
static void Main ()
|
|
{
|
|
}
|
|
}
|
|
</code></example>
|
|
<example>
|
|
Good example #1 (STAThread):
|
|
<code>
|
|
public class WindowsFormsEntryPoint {
|
|
[STAThread]
|
|
static void Main ()
|
|
{
|
|
}
|
|
}
|
|
</code></example>
|
|
<example>
|
|
Good example #2 (not Windows Forms):
|
|
<code>
|
|
public class ConsoleAppEntryPoint {
|
|
static void Main ()
|
|
{
|
|
}
|
|
}
|
|
</code></example>
|
|
</member>
|
|
</members>
|
|
</doc>
|