Terraria
v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
DesignerCategoryAttribute.cs
Go to the documentation of this file.
1
using
System.Diagnostics.CodeAnalysis
;
2
3
namespace
System.ComponentModel
;
4
5
[AttributeUsage(
AttributeTargets
.Class, AllowMultiple =
false
,
Inherited
=
true
)]
6
public
sealed
class
DesignerCategoryAttribute
:
Attribute
7
{
8
public
static
readonly
DesignerCategoryAttribute
Component
=
new
DesignerCategoryAttribute
(
"Component"
);
9
10
public
static
readonly
DesignerCategoryAttribute
Default
=
new
DesignerCategoryAttribute
();
11
12
public
static
readonly
DesignerCategoryAttribute
Form
=
new
DesignerCategoryAttribute
(
"Form"
);
13
14
public
static
readonly
DesignerCategoryAttribute
Generic =
new
DesignerCategoryAttribute
(
"Designer"
);
15
16
public
string
Category
{
get
; }
17
18
public
override
object
TypeId
=> GetType().FullName +
Category
;
19
20
public
DesignerCategoryAttribute
()
21
: this(
string
.
Empty
)
22
{
23
}
24
25
public
DesignerCategoryAttribute
(
string
category)
26
{
27
Category
= category;
28
}
29
30
public
override
bool
Equals
([NotNullWhen(
true
)]
object
?
obj
)
31
{
32
if
(
obj
is
DesignerCategoryAttribute
designerCategoryAttribute)
33
{
34
return
designerCategoryAttribute.Category ==
Category
;
35
}
36
return
false
;
37
}
38
39
public
override
int
GetHashCode
()
40
{
41
return
Category
?.GetHashCode() ?? 0;
42
}
43
44
public
override
bool
IsDefaultAttribute
()
45
{
46
return
Category
==
Default
.Category;
47
}
48
}
System.Attribute
Definition
Attribute.cs:12
System.ComponentModel.Component
Definition
Component.cs:5
System.ComponentModel.DesignerCategoryAttribute.Default
static readonly DesignerCategoryAttribute Default
Definition
DesignerCategoryAttribute.cs:10
System.ComponentModel.DesignerCategoryAttribute.DesignerCategoryAttribute
DesignerCategoryAttribute()
Definition
DesignerCategoryAttribute.cs:20
System.ComponentModel.DesignerCategoryAttribute.GetHashCode
override int GetHashCode()
Definition
DesignerCategoryAttribute.cs:39
System.ComponentModel.DesignerCategoryAttribute.Equals
override bool Equals([NotNullWhen(true)] object? obj)
Definition
DesignerCategoryAttribute.cs:30
System.ComponentModel.DesignerCategoryAttribute.IsDefaultAttribute
override bool IsDefaultAttribute()
Definition
DesignerCategoryAttribute.cs:44
System.ComponentModel.DesignerCategoryAttribute.TypeId
override object TypeId
Definition
DesignerCategoryAttribute.cs:18
System.ComponentModel.DesignerCategoryAttribute.Category
string Category
Definition
DesignerCategoryAttribute.cs:16
System.ComponentModel.DesignerCategoryAttribute.Form
static readonly DesignerCategoryAttribute Form
Definition
DesignerCategoryAttribute.cs:12
System.ComponentModel.DesignerCategoryAttribute.DesignerCategoryAttribute
DesignerCategoryAttribute(string category)
Definition
DesignerCategoryAttribute.cs:25
System.ComponentModel.DesignerCategoryAttribute
Definition
DesignerCategoryAttribute.cs:7
System.Empty
Definition
Empty.cs:4
string
System.ComponentModel.InheritanceLevel.Inherited
@ Inherited
System.ComponentModel
Definition
ColumnAttribute.cs:3
System.Diagnostics.CodeAnalysis
Definition
AllowNullAttribute.cs:1
System.ExceptionArgument.obj
@ obj
System.AttributeTargets
AttributeTargets
Definition
AttributeTargets.cs:5
source
System.ComponentModel.Primitives
System.ComponentModel
DesignerCategoryAttribute.cs
Generated by
1.10.0