private static Type GetKey(IExtendableEntity entity)
        {
            var order = entity as Order;

            if (order != null && order.Type == OrderTypes.Conditional)
            {
                return(typeof(DdeStopOrderColumns));
            }

            var position = entity as Position;

            if (position != null && (position.Security.Type == SecurityTypes.Future || position.Security.Type == SecurityTypes.Forward || position.Security.Type == SecurityTypes.Option))
            {
                return(typeof(DdeDerivativePositionColumns));
            }

            return(entity.GetType());
        }
		private static Type GetKey(IExtendableEntity entity)
		{
			var order = entity as Order;
			if (order != null && order.Type == OrderTypes.Conditional)
				return typeof(DdeStopOrderColumns);

			var position = entity as Position;
			if (position != null && (position.Security.Type == SecurityTypes.Future || position.Security.Type == SecurityTypes.Forward || position.Security.Type == SecurityTypes.Option))
				return typeof(DdeDerivativePositionColumns);

			return entity.GetType();
		}