private void PerfromExecution(int update, IDSFDataObject dataObject, ComPluginInvokeArgs args) { if (!IsObject) { int i = 0; foreach (var serviceOutputMapping in Outputs) { OutputDescription.DataSourceShapes[0].Paths[i].OutputExpression = DataListUtil.AddBracketsToValueIfNotExist(serviceOutputMapping.MappedTo); i++; } var outputFormatter = OutputFormatterFactory.CreateOutputFormatter(OutputDescription); args.OutputFormatter = outputFormatter; } Common.Utilities.PerformActionInsideImpersonatedContext(Common.Utilities.ServerUser, () => { _result = ComPluginServiceExecutionFactory.InvokeComPlugin(args).ToString(); }); ResponseManager = new ResponseManager { OutputDescription = OutputDescription, Outputs = Outputs, IsObject = IsObject, ObjectName = ObjectName }; ResponseManager.PushResponseIntoEnvironment(_result, update, dataObject, false); }
protected virtual void ExecuteInsideImpersonatedContext(ComPluginInvokeArgs args) { Common.Utilities.PerformActionInsideImpersonatedContext(Common.Utilities.ServerUser, () => { _result = ComPluginServiceExecutionFactory.InvokeComPlugin(args).ToString(); }); }