public SubscriptionDescription CreateSubscription(SubscriptionDescription description, Filter filter) { SqlFilter sf = filter as SqlFilter; var value = sf.SqlExpression; //we must parse on the first ' and then go to the end of the string -1 char var index = value.IndexOf('\''); var typeName = value.Substring(index + 1); typeName = typeName.Substring(0, typeName.Length - 1).Replace("_", "."); //NOTE Limit is test class must exist in this assembly for now. var theType = this.GetType().Assembly.GetType(typeName); _subscriptions.Add(new SubscriptionDescriptionState() { Description = description, Type = theType }); ServiceBusEnpointData endpoint = null; if (_endpointMap.TryGetValue(description, out endpoint)) { receiver.CreateSubscription(endpoint); } else { throw new Exception("Endpoint error"); } return(description); }