SubscriptionNameFor() публичный Метод

public SubscriptionNameFor ( string applicationName, Type handlerType ) : string
applicationName string
handlerType System.Type
Результат string
Пример #1
0
 public void WhenCreatingASubscriptionForATypeASpaceShouldBeConvertedToTheSanitizeCharacter()
 {
     var pathFactory = new PathFactory(new GlobalPrefixSetting());
     var subscriptionName = pathFactory.SubscriptionNameFor("My App", "App server", typeof(MyEventWithALongName));
     subscriptionName.ShouldBe("my.app.app.server.myeventwithalongname");
 }
Пример #2
0
 public void WhenCreatingANameForAMulticastSubscriptionWithAGlobalPrefix_ThePathShouldNotStartWithThePrefix()
 {
     var pathFactory = new PathFactory(new GlobalPrefixSetting {Value = "testprefix"});
     var subscriptionName = pathFactory.SubscriptionNameFor("My Application", "My Instance", typeof(SimpleEvent));
     subscriptionName.ShouldBe("my.application.my.instance.simpleevent");
 }
Пример #3
0
 public void WhenCreatingASubscriptionForATypeWeHaveAMaximumLengthOf50()
 {
     var pathFactory = new PathFactory(new GlobalPrefixSetting());
     var path = pathFactory.SubscriptionNameFor("MyLongApplicationName", "Appserver", typeof(MyEventWithALongName));
     path.Length.ShouldBe(50);
 }