title: Azure Functions QueueTrigger with variable name, QueueTriggerAttribute restrictions
body: <p>Assume the following typical <a href="https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-queue#trigger---c-example" rel="nofollow noreferrer">Queue Trigger</a> function:</p>
  
  <pre><code>public void Run([QueueTrigger("queue1")]object data, ILogger log)
  {
      // Do something with data
  }
  </code></pre>
  
  <p>My problem is that <code>"queue1"</code> has to be a constant field, so it has to be defined at compile time.
  Also, I'd want to have a base class for Queue Triggers, that could work like this:</p>
  
  <pre><code>public abstract class QueueBase&lt;TModel&gt;
  {
      public void Run([QueueTrigger("queueName")]TModel data, ILogger log)
      {
          // Do something with data, log something etc.
          OnRunExecuted(data);
          // Do something with data, log something etc.
      }
  
      public abstract void OnRunExecuted(TModel data);
  }
  </code></pre>
  
  <p>with this, I could write own classes which inherit from <code>QueueBase</code> but can even live inside a library which doesn't have <code>Microsoft.Azure.WebJobs</code> dependency:</p>
  
  <pre><code>public class MyQueueHandler : QueueBase&lt;MyModel&gt;
  {
      public void OnRunExecuted(MyModel data) =&gt; ...;
  }
  </code></pre>
  
  <p>But it's impossible to pass in a Queue name... is it?</p>