internal static byte[] ConvertExpressionStringToByteArray(string expression, ObjectSchema schema) { QueryParser.ConvertValueFromStringDelegate convertDelegate = new QueryParser.ConvertValueFromStringDelegate(MonadFilter.ConvertValueFromString); QueryParser.EvaluateVariableDelegate evalDelegate = new QueryParser.EvaluateVariableDelegate(FilterNode.VarConverter); QueryParser queryParser = new QueryParser(expression, schema, QueryParser.Capabilities.All, evalDelegate, convertDelegate); return(WinformsHelper.Serialize(queryParser.ParseTree)); }
public override void ExtensionExecute(IExchangeExtensionSnapIn snapIn) { try { snapIn.SharedDataItem.RequestDataUpdate(WinformsHelper.Serialize(this)); } catch (PrimarySnapInDataException) { } }
public sealed override void ExtensionExecute(IExchangeExtensionSnapIn snapIn) { this.Execute(snapIn); try { snapIn.SharedDataItem.RequestDataUpdate(WinformsHelper.Serialize(new AcKnowledgeCommand { AcknowledgedId = this.Id })); } catch (PrimarySnapInDataException) { } }
public void Save() { try { byte[] array = WinformsHelper.Serialize(this); if (this.serializedSettings == null || !WinformsHelper.ByteArrayEquals(array, this.serializedSettings)) { using (RegistryKey registryKey = Registry.CurrentUser.CreateSubKey("SOFTWARE\\Microsoft\\ExchangeServer\\v15\\AdminTools")) { registryKey.SetValue(NodeStructureSettingsStore.NodeStructureSettings, array, RegistryValueKind.Binary); } } } catch (SecurityException) { } catch (UnauthorizedAccessException) { } }
protected override void OnExecute() { base.OnExecute(); QueueViewerQueuesResultPane queueViewerQueuesResultPane = base.ResultPane as QueueViewerQueuesResultPane; QueueViewerResultPane queueViewerResultPane = base.ResultPane.ContainerResultPane as QueueViewerResultPane; QueryFilter data = new ComparisonFilter(ComparisonOperator.Equal, ExtensibleMessageInfoSchema.Queue, queueViewerQueuesResultPane.SelectedIdentity); queueViewerResultPane.MessageListResultPane.Text = queueViewerQueuesResultPane.SelectedName; queueViewerResultPane.CommandMessagesView.Text = new LocalizedString(queueViewerResultPane.MessageListResultPane.Text); if (!queueViewerResultPane.ResultPaneTabs.Contains(queueViewerResultPane.MessageListResultPane)) { queueViewerResultPane.ResultPaneTabs.Add(queueViewerResultPane.MessageListResultPane); queueViewerResultPane.CommandMessagesView.Visible = true; QueueViewerResultPaneBase messageListResultPane = queueViewerResultPane.MessageListResultPane; messageListResultPane.SettingsKey = messageListResultPane.Name; messageListResultPane.LoadComponentSettings(); } queueViewerResultPane.MessageListResultPane.Datasource.BeginInit(); queueViewerResultPane.SelectedResultPane = queueViewerResultPane.MessageListResultPane; queueViewerResultPane.MessageListResultPane.ObjectList.FilterControl.PersistedExpression = WinformsHelper.Serialize(data); queueViewerResultPane.MessageListResultPane.Datasource.GoToFirstPage(); queueViewerResultPane.MessageListResultPane.Datasource.EndInit(); queueViewerResultPane.MessageListResultPane.Datasource.Refresh(); }
public sealed override void PrimaryExecute(string key, CommunicationChannelCollection channels, NodeStructureSettingsStore store, SyncQueue syncQueue) { channels[key].Channel.SetData(WinformsHelper.Serialize(this)); }