<commit_before>﻿using Glimpse.Core.Extensibility;
using Glimpse.Core.Extensions;
using Glimpse.Core.Message;
using System.Collections.Generic;
using System.Collections.Specialized;

namespace Navigation.Glimpse.AlternateType
{
	public class StateHandler : AlternateType<IStateHandler>
	{
		private IEnumerable<IAlternateMethod> allMethods;

		public StateHandler(IProxyFactory proxyFactory)
			: base(proxyFactory)
		{
		}

		public override IEnumerable<IAlternateMethod> AllMethods
		{
			get
			{
				return allMethods ?? (allMethods = new List<IAlternateMethod>
                    {
						new GetNavigationLink()
                    });
			}
		}

		public class GetNavigationLink : AlternateMethod
		{
			public GetNavigationLink()
				: base(typeof(IStateHandler), "GetNavigationLink")
			{
			}

			public override void PostImplementation(IAlternateMethodContext context, TimerResult timerResult)
			{
				var link = context.ReturnValue as string;
				var state = context.Arguments[0] as State;
				var data = ((NameValueCollection) context.Arguments[1]).ToDictionary();
				data.Remove(NavigationSettings.Config.StateIdKey);
				data.Remove(NavigationSettings.Config.PreviousStateIdKey);
				data.Remove(NavigationSettings.Config.ReturnDataKey);
				data.Remove(NavigationSettings.Config.CrumbTrailKey);
				context.MessageBroker.Publish(new Message(link, state, data));
			}

			public class Message : MessageBase
			{
				public Message(string link, State state, IDictionary<string, string> data)
				{
					Link = link;
					State = state;
					Data = data;
				}

				public string Link { get; set; }

				public State State { get; set; }
<commit_msg>Removed httproute from WebApi data<commit_after>﻿using Glimpse.Core.Extensibility;
using Glimpse.Core.Extensions;
using Glimpse.Core.Message;
using System.Collections.Generic;
using System.Collections.Specialized;

namespace Navigation.Glimpse.AlternateType
{
	public class StateHandler : AlternateType<IStateHandler>
	{
		private IEnumerable<IAlternateMethod> allMethods;

		public StateHandler(IProxyFactory proxyFactory)
			: base(proxyFactory)
		{
		}

		public override IEnumerable<IAlternateMethod> AllMethods
		{
			get
			{
				return allMethods ?? (allMethods = new List<IAlternateMethod>
                    {
						new GetNavigationLink()
                    });
			}
		}

		public class GetNavigationLink : AlternateMethod
		{
			public GetNavigationLink()
				: base(typeof(IStateHandler), "GetNavigationLink")
			{
			}

			public override void PostImplementation(IAlternateMethodContext context, TimerResult timerResult)
			{
				var link = context.ReturnValue as string;
				var state = context.Arguments[0] as State;
				var data = ((NameValueCollection) context.Arguments[1]).ToDictionary();
				data.Remove(NavigationSettings.Config.StateIdKey);
				data.Remove(NavigationSettings.Config.PreviousStateIdKey);
				data.Remove(NavigationSettings.Config.ReturnDataKey);
				data.Remove(NavigationSettings.Config.CrumbTrailKey);
				data.Remove("httproute");
				context.MessageBroker.Publish(new Message(link, state, data));
			}

			public class Message : MessageBase
			{
				public Message(string link, State state, IDictionary<string, string> data)
				{
					Link = link;
					State = state;
					Data = data;
				}

				public string Link { get; set; }

				public State State { get; set; }

{'fraction_non_alphanumeric': 0.09125925925925926, 'fraction_numerical': 0.0011851851851851852, 'mean_word_length': 3.748241912798875, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3392811', 'n_tokens_mistral': 1174, 'n_tokens_neox': 956, 'n_words': 205}