Class CustomSectionDefinition
Represents a custom section definition. This type of section definition can be created and updated by the user. The fields and validators are chosen freely.
[Serializable]
public class CustomSectionDefinition : SectionDefinition, CustomDataType, DataType, IManagerIdentifiableObject<SectionDefinitionID>, ITrackLastModified
- Inheritance
-
CustomSectionDefinition
- Implements
- Inherited Members
- Extension Methods
Examples
JobManagerHelper jobManagerHelper = new JobManagerHelper(msg => protocol.SLNet.RawConnection.HandleMessages(msg));
var sectionDefinition = new CustomSectionDefinition
{
Name = "MyCustomSectionDefinition"
};
var fieldDescriptor = new FieldDescriptor
{
Name = "MyStringField",
FieldType = typeof(string),
IsOptional = true,
};
sectionDefinition.AddOrReplaceFieldDescriptor(fieldDescriptor);
sectionDefinition = jobManagerHelper.SectionDefinitions.Create(sectionDefinition) as CustomSectionDefinition;
Constructors
- CustomSectionDefinition()
Initializes a new instance of the CustomSectionDefinition class.
Properties
- ID
Gets or sets the section definition ID.
- IsHidden
Gets or sets a value indicating whether this section definition is hidden.
- Name
Gets or sets the name.
- ReservationLinkInfo
Gets or sets the reservation link info.
- SectionValidators
Gets the section validators.
Methods
- AddOrReplaceFieldDescriptor(FieldDescriptor)
Adds or replaces the specified field descriptor.
- Equals(CustomSectionDefinition)
Indicates whether the current object is equal to another object of the same type.
- Equals(object)
Determines whether the specified object is equal to the current object.
- GetAllFieldDescriptors()
Retrieves all field descriptors.
- GetAllSectionValidators()
Retrieves all section validators.
- GetHashCode()
Calculates the hash code for this object.
- GetID()
Retrieves the section definition ID.
- GetIsHidden()
Retrieves a value indicating whether this section definition is hidden.
- GetName()
Retrieves the name of this custom section definition.
- GetReservationLinkInfo()
Retrieves the reservation link info.
- RemoveFieldDescriptor(FieldDescriptorID)
Removes the field descriptor with the specified ID.
- SetID(SectionDefinitionID)
Sets the section definition ID.