Get Service instance from request filter

I want to set a variable on my service instance before each request in that service is executed. Can this be done with an attribute? If not by an attribute, is there another way to get the service instance and call a method on it or set a variable before the request executes?

Sample code to illustrate my point:

[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, Inherited = false, AllowMultiple = false)]
public class SetRequestNameAttribute : RequestFilterAttribute
{
    public override void Execute(IRequest req, IResponse res, object requestDto)
    {
        //how to set the requestName variable on the TestService instance from here?
        
    }
}

[SetRequestName]
public class TestServices : Service
{
    public string requestName = "";
    public object Get(Hello request)
    {
        requestName = request.Name;  //want to remove this, and use attribute instead
        return new HelloResponse { Result = "Hello, {0}!".Fmt(request.Name) };
    }
    public object Post(Hello request)
    {
        requestName = request.Name; //want to remove this, and use attribute instead
        return new HelloResponse { Result = "Hello, {0}!".Fmt(request.Name) };
    }
}

You can just case the requestDto to your type as normal, e.g:

var hello = requestDto as Hello;
if (hello != null)
    hello.Name = ...;

If you want the same behavior for multiple Request DTO’s you can just have them implement the same interface with the common properties you want to modify.