Struct AttachmentIdentifier
A tool to identify attachments.
public readonly struct AttachmentIdentifier
- Inherited Members
- Extension Methods
Properties
Code
Gets the attachment code.
public uint Code { get; }
Property Value
Name
Gets the attachment name.
public AttachmentName Name { get; }
Property Value
- AttachmentName
Slot
Gets the attachment slot.
public AttachmentSlot Slot { get; }
Property Value
- AttachmentSlot
Methods
Equals(AttachmentIdentifier)
Indicates whether this instance and a AttachmentIdentifier are equal.
public bool Equals(AttachmentIdentifier attachmentIdentifier)
Parameters
attachmentIdentifier
AttachmentIdentifierThe AttachmentIdentifier to compare with the current instance.
Returns
- bool
true if AttachmentIdentifier and this instance represent the same value; otherwise, false.
Equals(Attachment)
Indicates whether this instance and a InventorySystem.Items.Firearms.Attachments.Components.Attachment are equal.
public bool Equals(Attachment firearmAttachment)
Parameters
firearmAttachment
AttachmentThe InventorySystem.Items.Firearms.Attachments.Components.Attachment to compare with the current instance.
Returns
- bool
true if InventorySystem.Items.Firearms.Attachments.Components.Attachment and this instance represent the same value; otherwise, false.
Equals(object)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object obj)
Parameters
obj
objectThe object to compare with the current instance.
Returns
- bool
true if
obj
and this instance are the same type and represent the same value; otherwise, false.
Get(FirearmType, AttachmentName)
Gets a AttachmentIdentifier by name.
public static AttachmentIdentifier Get(FirearmType type, AttachmentName name)
Parameters
type
FirearmTypeWeapons FirearmType.
name
AttachmentNameAttachment name.
Returns
- AttachmentIdentifier
AttachmentIdentifier instance.
Get(FirearmType, AttachmentSlot)
Gets the all AttachmentIdentifier's for type, by slot.
public static IEnumerable<AttachmentIdentifier> Get(FirearmType type, AttachmentSlot slot)
Parameters
type
FirearmTypeWeapons FirearmType.
slot
AttachmentSlotAttachment slot.
Returns
- IEnumerable<AttachmentIdentifier>
AttachmentIdentifier instance.
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.
TryParse(string, out AttachmentIdentifier)
Converts the string representation of a AttachmentIdentifier to its AttachmentIdentifier equivalent. A return value indicates whether the conversion is succeeded or failed.
public static bool TryParse(string s, out AttachmentIdentifier identifier)
Parameters
s
stringThe string to convert.
identifier
AttachmentIdentifierThe converted string.
Returns
TryParse(string, out AttachmentName)
Converts the string representation of a InventorySystem.Items.Firearms.Attachments.AttachmentName to its InventorySystem.Items.Firearms.Attachments.AttachmentName equivalent. A return value indicates whether the conversion is succeeded or failed.
public static bool TryParse(string s, out AttachmentName name)
Parameters
Returns
Operators
operator +(AttachmentIdentifier, uint)
Computes the sum of its right-hand AttachmentIdentifier operand and its left-hand uint operand.
public static uint operator +(AttachmentIdentifier left, uint right)
Parameters
left
AttachmentIdentifierThe AttachmentIdentifier to be added up.
right
uintThe uint to be added up.
Returns
operator +(uint, AttachmentIdentifier)
Computes the sum of its right-hand uint operand and its left-hand AttachmentIdentifier operand.
public static uint operator +(uint left, AttachmentIdentifier right)
Parameters
left
uintThe uint to be added up.
right
AttachmentIdentifierThe AttachmentIdentifier to be added up.
Returns
operator ==(AttachmentIdentifier, AttachmentIdentifier)
Compares two operands: AttachmentIdentifier and AttachmentIdentifier.
public static bool operator ==(AttachmentIdentifier left, AttachmentIdentifier right)
Parameters
left
AttachmentIdentifierThe left-hand AttachmentIdentifier operand to compare.
right
AttachmentIdentifierThe right-hand AttachmentIdentifier operand to compare.
Returns
operator ==(AttachmentIdentifier, Attachment)
Compares two operands: AttachmentIdentifier and InventorySystem.Items.Firearms.Attachments.Components.Attachment.
public static bool operator ==(AttachmentIdentifier left, Attachment right)
Parameters
left
AttachmentIdentifierThe AttachmentIdentifier to compare.
right
AttachmentThe InventorySystem.Items.Firearms.Attachments.Components.Attachment to compare.
Returns
operator ==(Attachment, AttachmentIdentifier)
Compares two operands: AttachmentIdentifier and InventorySystem.Items.Firearms.Attachments.Components.Attachment.
public static bool operator ==(Attachment left, AttachmentIdentifier right)
Parameters
left
AttachmentThe InventorySystem.Items.Firearms.Attachments.Components.Attachment to compare.
right
AttachmentIdentifierThe AttachmentIdentifier to compare.
Returns
operator !=(AttachmentIdentifier, AttachmentIdentifier)
Compares two operands: AttachmentIdentifier and AttachmentIdentifier.
public static bool operator !=(AttachmentIdentifier left, AttachmentIdentifier right)
Parameters
left
AttachmentIdentifierThe left-hand AttachmentIdentifier operand to compare.
right
AttachmentIdentifierThe right-hand AttachmentIdentifier to compare.
Returns
operator !=(AttachmentIdentifier, Attachment)
Compares two operands: AttachmentIdentifier and InventorySystem.Items.Firearms.Attachments.Components.Attachment.
public static bool operator !=(AttachmentIdentifier left, Attachment right)
Parameters
left
AttachmentIdentifierThe AttachmentIdentifier to compare.
right
AttachmentThe InventorySystem.Items.Firearms.Attachments.Components.Attachment to compare.
Returns
operator !=(Attachment, AttachmentIdentifier)
Compares two operands: AttachmentIdentifier and InventorySystem.Items.Firearms.Attachments.Components.Attachment.
public static bool operator !=(Attachment left, AttachmentIdentifier right)
Parameters
left
AttachmentThe InventorySystem.Items.Firearms.Attachments.Components.Attachment to compare.
right
AttachmentIdentifierThe AttachmentIdentifier to compare.
Returns
operator -(AttachmentIdentifier, uint)
Subtracts its right-hand AttachmentIdentifier operand from its left-hand uint operand.
public static uint operator -(AttachmentIdentifier left, uint right)
Parameters
left
AttachmentIdentifierThe AttachmentIdentifier to be subtracted.
right
uintThe uint to be subtracted.
Returns
operator -(uint, AttachmentIdentifier)
Subtracts its right-hand uint operand from its left-hand AttachmentIdentifier operand.
public static uint operator -(uint left, AttachmentIdentifier right)
Parameters
left
uintThe uint to be subtracted.
right
AttachmentIdentifierThe AttachmentIdentifier to be subtracted.