// #endregion #region Package Editing /// <summary> /// Add/Edit Package /// </summary> /// <param name="inspector"></param> internal void AddEditPackage(Outlook.Inspector inspector, string ShareLink) { MessageInspector objMessageInspector = FindMessageInspector(inspector); objMessageInspector.InsertLinksIntoMessageBody(ShareLink); //objMessageInspector.AddEditPackage(); }
public void ApplyDispatchBehavior(ServiceEndpoint endpoint, EndpointDispatcher endpointDispatcher) { Console.WriteLine("Insider Apply Dispatch Behaviour"); MessageInspector inspctor = new MessageInspector(); endpointDispatcher.DispatchRuntime.MessageInspectors.Add(inspctor); }
public void ApplyDispatchBehavior(ServiceDescription serviceDescription, ServiceHostBase serviceHostBase) { foreach (ChannelDispatcher dispatcher in serviceHostBase.ChannelDispatchers) { foreach (EndpointDispatcher endpointDispatcher in dispatcher.Endpoints) { ServiceEndpoint endpoint = serviceDescription.Endpoints.Find(endpointDispatcher.EndpointAddress.Uri); var inspector = new MessageInspector(endpoint.Binding.MessageVersion.Addressing); endpointDispatcher.DispatchRuntime.MessageInspectors.Add(inspector); } } }
public void ApplyDispatchBehavior(ServiceDescription serviceDescription, ServiceHostBase serviceHostBase) { ServiceHost host = (ServiceHost) serviceHostBase; IFilterMapProvider provider = (IFilterMapProvider)host.SingletonInstance; foreach (ChannelDispatcher dispatcher in serviceHostBase.ChannelDispatchers) { foreach (EndpointDispatcher endpointDispatcher in dispatcher.Endpoints) { var inspector = new MessageInspector(provider.ProvideFilterMap()); endpointDispatcher.DispatchRuntime.MessageInspectors.Add(inspector); } } }
public void ApplyDispatchBehavior(ServiceDescription serviceDescription, ServiceHostBase serviceHostBase) { ServiceHost host = (ServiceHost)serviceHostBase; IFilterMapProvider provider = (IFilterMapProvider)host.SingletonInstance; foreach (ChannelDispatcher dispatcher in serviceHostBase.ChannelDispatchers) { foreach (EndpointDispatcher endpointDispatcher in dispatcher.Endpoints) { var inspector = new MessageInspector(provider.ProvideFilterMap()); endpointDispatcher.DispatchRuntime.MessageInspectors.Add(inspector); } } }
/// <summary> /// Event handler for the close event of the current inspector /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void objMessageInspector_OnClose(object sender, CloseEventArgs e) { try { MessageInspector objMessageInspector = (MessageInspector)sender; objMessageInspector.OnClose -= new EventHandler <CloseEventArgs>(objMessageInspector_OnClose); objMessageInspector.OnInvalidateControl -= ObjMessageInspector_OnInvalidateControl; _MessageInspectorDictionary.Remove(objMessageInspector.Id); } catch (Exception ex) { System.Diagnostics.Trace.WriteLine(ex); } }
public void ApplyDispatchBehavior(ServiceDescription serviceDescription, ServiceHostBase serviceHostBase) { for (int i = 0; i < serviceHostBase.ChannelDispatchers.Count; i++) { ChannelDispatcher channelDispatcher = serviceHostBase.ChannelDispatchers[i] as ChannelDispatcher; if (channelDispatcher != null) { foreach (EndpointDispatcher endpointDispatcher in channelDispatcher.Endpoints) { MessageInspector inspector = new MessageInspector(); endpointDispatcher.DispatchRuntime.MessageInspectors.Add(inspector); } } } }
public void ApplyDispatchBehavior(ServiceDescription serviceDescription, ServiceHostBase serviceHostBase) { for (int i = 0; i < serviceHostBase.ChannelDispatchers.Count; i++) { ChannelDispatcher channelDispatcher = serviceHostBase.ChannelDispatchers[i] as ChannelDispatcher; if (channelDispatcher != null) { foreach (EndpointDispatcher endpointDispatcher in channelDispatcher.Endpoints) { var inspector = new MessageInspector(); endpointDispatcher.DispatchRuntime.MessageInspectors.Add(inspector); } } } }
public void ApplyClientBehavior (ServiceEndpoint endpoint, ClientRuntime clientRuntime) { ClientBehaviorApplied = true; var inspector = new MessageInspector (); inspector.RequestSending += delegate (ref Message message, IClientChannel channel) { if (RequestSending != null) return RequestSending (ref message, channel); else return null; }; inspector.ReplyReceived += delegate (ref Message reply, object correlationState) { if (ReplyReceived != null) ReplyReceived (ref reply, correlationState); }; clientRuntime.MessageInspectors.Add (inspector); }
public void ApplyDispatchBehavior (ServiceEndpoint endpoint, EndpointDispatcher endpointDispatcher) { DispatchBehaviorApplied = true; var inspector = new MessageInspector (); inspector.RequestReceived += delegate (ref Message message, IClientChannel channel, InstanceContext instanceContext) { if (RequestReceived != null) return RequestReceived (ref message, channel, instanceContext); else return null; }; inspector.ReplySending += delegate (ref Message reply, object correlationState) { if (ReplySending != null) ReplySending (ref reply, correlationState); }; endpointDispatcher.DispatchRuntime.MessageInspectors.Add (inspector); }
public void ApplyDispatchBehavior(ServiceDescription serviceDescription, ServiceHostBase serviceHostBase) { foreach (ChannelDispatcherBase dispatcher in serviceHostBase.ChannelDispatchers) { var channelDispatcher = dispatcher as ChannelDispatcher; if (channelDispatcher != null) { foreach (EndpointDispatcher endpointDispatcher in channelDispatcher.Endpoints) { var inspector = new MessageInspector(); endpointDispatcher.DispatchRuntime.MessageInspectors.Add(inspector); } } } //var config = new ServiceLayerConfiguration(); //config.RequestProcessorImplementation = typeof(PassThruRequestProcessor); //config.Initialize(); }
/// <summary> /// Event handler for the new inspector event /// </summary> /// <param name="inspector"></param> void _Inspectors_NewInspector(Outlook.Inspector inspector) { try { OutlookItem objOutlookItem = new OutlookItem(inspector.CurrentItem); // Make sure this is a message item if ((objOutlookItem.Class == Outlook.OlObjectClass.olMail) && (objOutlookItem.MessageClass.StartsWith(Constants.IPMClass))) { // Check to see if this is a new window we don't already track MessageInspector objExistingInspector = this.FindMessageInspector(inspector); // If not found in our dictionary, add it if (objExistingInspector == null) { MessageInspector objMessageInspector = new MessageInspector(inspector); objMessageInspector.OnClose += new EventHandler <CloseEventArgs>(objMessageInspector_OnClose); objMessageInspector.OnInvalidateControl += ObjMessageInspector_OnInvalidateControl; _MessageInspectorDictionary.Add(objMessageInspector.Id, objMessageInspector); //Customize the UI //Office.CommandBars objCommandBars = objMessageInspector.Window.CommandBars; } } } catch (Exception Ex) { System.Diagnostics.Trace.WriteLine(Ex); MessageBox.Show( Ex.Message, Constants.EditorAppName, MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public void ApplyDispatchBehavior(ServiceEndpoint endpoint, EndpointDispatcher endpointDispatcher) { DispatchBehaviorApplied = true; var inspector = new MessageInspector(); inspector.RequestReceived += delegate(ref Message message, IClientChannel channel, InstanceContext instanceContext) { if (RequestReceived != null) { return(RequestReceived(ref message, channel, instanceContext)); } else { return(null); } }; inspector.ReplySending += delegate(ref Message reply, object correlationState) { if (ReplySending != null) { ReplySending(ref reply, correlationState); } }; endpointDispatcher.DispatchRuntime.MessageInspectors.Add(inspector); }
public void ApplyClientBehavior(ServiceEndpoint endpoint, ClientRuntime clientRuntime) { ClientBehaviorApplied = true; var inspector = new MessageInspector(); inspector.RequestSending += delegate(ref Message message, IClientChannel channel) { if (RequestSending != null) { return(RequestSending(ref message, channel)); } else { return(null); } }; inspector.ReplyReceived += delegate(ref Message reply, object correlationState) { if (ReplyReceived != null) { ReplyReceived(ref reply, correlationState); } }; clientRuntime.MessageInspectors.Add(inspector); }
public void ApplyDispatchBehavior(ServiceEndpoint endpoint, EndpointDispatcher endpointDispatcher) { var inspector = new MessageInspector(); endpointDispatcher.DispatchRuntime.MessageInspectors.Add(inspector); }