Implement SensitivityLabel object model#445
Implement SensitivityLabel object model#445jozefizso wants to merge 5 commits intoreleases/netoffice_v1.9.8from
SensitivityLabel object model#445Conversation
Implementation Plan for SensitivityLabel Object ModelOverviewThe
Files Created1. DispatchInterfaces/SensitivityLabel.csLocation: Structure:
Properties:
Methods: CreateLabelInfo()
GetLabel()
SetLabel(LabelInfo, object)
Documentation: /// <summary>
/// DispatchInterface SensitivityLabel
/// SupportByVersion Office, 16
/// </summary>
/// <remarks>
/// Represents a wrapper object for accessing sensitivity label on the active document.
/// <para>SensitivityLabel applied on a document requires the use of policy defined by organization administrator. The organization is identified by using an identity of an Office Account signed into Office.</para>
/// <para>Docs: <see href="https://learn.microsoft.com/en-us/office/vba/api/office.sensitivitylabel"/></para>
/// </remarks>2. DispatchInterfaces/LabelInfo.csLocation: Structure:
Properties (All Read/Write):
Methods:
Documentation: /// <summary>
/// DispatchInterface LabelInfo
/// SupportByVersion Office, 16
/// </summary>
/// <remarks>
/// Represents the label information data object.
/// <para>The LabelInfo object can be passed to SetLabel method of SensitivityLabel object.</para>
/// <para>Docs: <see href="https://learn.microsoft.com/en-us/office/vba/api/office.labelinfo"/></para>
/// </remarks>3. Enums/MsoAssignmentMethod.csLocation: Structure:
Enumeration Values:
Documentation: /// <summary>
/// Indicates the assignment method in a LabelInfo object.
/// </summary>
/// <remarks>
/// <para>MSDN Online Documentation: <see href="https://learn.microsoft.com/en-us/office/vba/api/overview/library-reference/msoassignmentmethod-enumeration-office"/></para>
/// </remarks>Implementation DetailsStandard Patterns Followed1. Constructor PatternAll dispatch interface classes follow the standard NetOffice constructor pattern with multiple overloads:
2. Property Pattern[SupportByVersion("Office", 16)]
public string PropertyName
{
get { return Factory.ExecuteStringPropertyGet(this, "PropertyName"); }
set { Factory.ExecuteValuePropertySet(this, "PropertyName", value); }
}3. Method Pattern[SupportByVersion("Office", 16)]
public ReturnType MethodName(ParameterType param)
{
return Factory.ExecuteKnownReferenceMethodGet<ReturnType>(this, "MethodName", ReturnType.LateBindingApiWrapperType);
}4. Enum Pattern[SupportByVersion("Office", 16)]
EnumValue = NumericValue,Integration PointsFuture Integration StepsAfter creating the files, the following integration is needed:
Testing Considerations
Additional Notes
References
Implementation Status✅ Completed:
Pending:
Implementation completed: November 4-5, 2025 |
Implements the
SensitivyLabelclass and related data types.I used the Plan mode with Claude Sonnet 4.5 to prepare the implementation, and the Agent mode with Claude Haiku 4.5 to implement the changes.
Prompt for plan