/** Handle results returned from the document */ public override void _HandleResult(Newtonsoft.Json.Linq.JToken value) { if (OfficeExtension.Utility._IsNullOrUndefined(value)) { return; } Newtonsoft.Json.Linq.JObject obj = value as Newtonsoft.Json.Linq.JObject; if (obj == null) { return; } OfficeExtension.Utility._FixObjectPathIfNecessary(this, obj); if (!OfficeExtension.Utility._IsUndefined(obj["Options"])) { this.LoadedPropertyNames.Add("Options"); this.m_options = obj["Options"].ToObject <Microsoft.ExcelServices.WorksheetProtectionOptions>(); } if (!OfficeExtension.Utility._IsUndefined(obj["Protected"])) { this.LoadedPropertyNames.Add("Protected"); this.m_protected = obj["Protected"].ToObject <bool>(); } }
public void Protect(Microsoft.ExcelServices.WorksheetProtectionOptions options, string password) { /* Begin_PlaceHolder_WorksheetProtection_Protect */ /* End_PlaceHolder_WorksheetProtection_Protect */ OfficeExtension.ActionFactory._CreateMethodAction(this.Context, this, "Protect", OfficeExtension.OperationType.Default, new object[] { options, password }); }