-
Notifications
You must be signed in to change notification settings - Fork 158
Implement SensitivityLabel object model
#445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: releases/netoffice_v1.9.8
Are you sure you want to change the base?
Implement SensitivityLabel object model
#445
Conversation
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