Guest User

Untitled

a guest
Nov 21st, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. public static string Get()
  2. {
  3. var entryAssembly = Assembly.GetEntryAssembly();
  4. if (entryAssembly != null && entryAssembly.EntryPoint != null)
  5. {
  6. return entryAssembly.EntryPoint.ReflectedType.Namespace ??
  7. entryAssembly.EntryPoint.ReflectedType.Assembly.GetName().Name;
  8. }
  9.  
  10. throw new InvalidOperationException(
  11. "No endpoint name could be generated, please specify your own convention using Configure.DefineEndpointName(...)");
  12. }
Add Comment
Please, Sign In to add comment