Table of Contents

Class Section

Namespace
Skyline.DataMiner.Net.Sections
Assembly
SLNetTypes.dll

Represents a Job section. A section is a grouping of fields.

[Serializable]
[JsonObject(MemberSerialization.OptIn)]
public class Section : IManagerIdentifiableObject<SectionID>
Inheritance
Section
Implements
Extension Methods

Examples

JobManagerHelper jobManagerHelper = new JobManagerHelper(msg => protocol.SLNet.RawConnection.HandleMessages(msg));

var sectionDefinition = jobManagerHelper.SectionDefinitions.Read(SectionDefinitionExposers.Name.Equal("MyCustomSectionDefinition")).FirstOrDefault() as CustomSectionDefinition;
var fieldDescriptor = sectionDefinition.GetAllFieldDescriptors().FirstOrDefault(x => x.Name == "MyStringField");

var section = new Section(sectionDefinition);
section.AddOrUpdateValue(fieldDescriptor, "My field value.");

Remarks

A section has a reference to its corresponding SectionDefinition, which defines which fields (FieldValue) can or must go in the section.

Constructors

Section()

Initializes a new instance of the Section class.

Section(SectionDefinition)

Initializes a new instance of the Section class using the specified section definition.

Section(SectionDefinitionID)

Initializes a new instance of the Section class using the specified section definition ID.

Section(SerializationInfo, StreamingContext)

Initializes a new instance of the Section class using the specified serialization info and streaming context.

Properties

FieldValues

Gets the field values.

ID

Gets or sets the section ID.

SectionDefinitionID

Gets or sets the section definition ID.

Methods

AddOrReplaceFieldValue(FieldValue)

Adds or replaces the specified field value.

Clone()

Creates a new object that is a copy of the current instance.

Equals(Section)

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.

FromJson(string)

Deserializes the specified JSON string into a new instance of the Section class.

GetFieldValueById(FieldDescriptorID)

Retrieves the field value of the field with the specified ID.

GetHashCode()

Calculates the hash code for this object.

GetObjectData(SerializationInfo, StreamingContext)

Populates a SerializationInfo with the data needed to serialize the target object.

GetSectionDefinition()

Retrieves the section definition.

RemoveFieldValueById(FieldDescriptorID)

Removes all field values with the specified field descriptor ID.

Stitch(Func<SectionDefinitionID, SectionDefinition>)

Stitches this section with the corresponding section definition.

ToJson()

Retrieves the JSON representation of this Section object.

ToString()

Returns a string that represents the current object.