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
attachmentIdentifierAttachmentIdentifierThe 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
firearmAttachmentAttachmentThe 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
objobjectThe object to compare with the current instance.
Returns
- bool
true if
objand 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
typeFirearmTypeWeapons FirearmType.
nameAttachmentNameAttachment 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
typeFirearmTypeWeapons FirearmType.
slotAttachmentSlotAttachment 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
sstringThe string to convert.
identifierAttachmentIdentifierThe 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
leftAttachmentIdentifierThe AttachmentIdentifier to be added up.
rightuintThe 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
leftuintThe uint to be added up.
rightAttachmentIdentifierThe AttachmentIdentifier to be added up.
Returns
operator ==(AttachmentIdentifier, AttachmentIdentifier)
Compares two operands: AttachmentIdentifier and AttachmentIdentifier.
public static bool operator ==(AttachmentIdentifier left, AttachmentIdentifier right)
Parameters
leftAttachmentIdentifierThe left-hand AttachmentIdentifier operand to compare.
rightAttachmentIdentifierThe 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
leftAttachmentIdentifierThe AttachmentIdentifier to compare.
rightAttachmentThe 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
leftAttachmentThe InventorySystem.Items.Firearms.Attachments.Components.Attachment to compare.
rightAttachmentIdentifierThe AttachmentIdentifier to compare.
Returns
operator !=(AttachmentIdentifier, AttachmentIdentifier)
Compares two operands: AttachmentIdentifier and AttachmentIdentifier.
public static bool operator !=(AttachmentIdentifier left, AttachmentIdentifier right)
Parameters
leftAttachmentIdentifierThe left-hand AttachmentIdentifier operand to compare.
rightAttachmentIdentifierThe 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
leftAttachmentIdentifierThe AttachmentIdentifier to compare.
rightAttachmentThe 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
leftAttachmentThe InventorySystem.Items.Firearms.Attachments.Components.Attachment to compare.
rightAttachmentIdentifierThe 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
leftAttachmentIdentifierThe AttachmentIdentifier to be subtracted.
rightuintThe 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
leftuintThe uint to be subtracted.
rightAttachmentIdentifierThe AttachmentIdentifier to be subtracted.