Class Element
The base class of Votanic elements.
Votanic 元素的底層類別。
Inheritance
System.Object
Element
Namespace: Votanic
Assembly: Votanic.Core.dll
Syntax
public abstract class Element
Fields
name
Name field.
名稱欄。
Declaration
[Tooltip("Name field.\n名稱欄。")]
public string name
Field Value
Type | Description |
---|---|
System.String |
Methods
Contains(String, Boolean, Boolean)
Return true if the NAME parameter or element name containes others.
當 NAME 參數或元素名稱包含對方時傳回 true。
Element v = vElements.Find(Contains("NAME"));
Declaration
public static Predicate<Element> Contains(string name, bool singleSide = true, bool caseSensitive = false)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Checking name |
System.Boolean | singleSide | Only check element name contains NAME parameter |
System.Boolean | caseSensitive | Check with case sensitive |
Returns
Type | Description |
---|---|
System.Predicate<Element> |
Equals(String, Boolean)
Return true if the element name is equals to NAME parameter.
當 NAME 參數與元素名稱相同時傳回 true。
Element v = vElements.Find(Equals("NAME"));
Declaration
public static Predicate<Element> Equals(string name, bool caseSensitive = false)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | Checking name |
System.Boolean | caseSensitive | Check with case sensitive |
Returns
Type | Description |
---|---|
System.Predicate<Element> |
Operators
Implicit(Element to Boolean)
Return true if the element is not a null reference.
當元素不是空的參考時傳回 true。
if (vElement) ...
Declaration
public static implicit operator bool (Element exists)
Parameters
Type | Name | Description |
---|---|---|
Element | exists |
Returns
Type | Description |
---|---|
System.Boolean |