public ElementInstance(ILinkElement instance) { this.instance = instance; invoker = CreateInvoker(instance); // You would do it smarter IsBefore = instance.GetType().BaseType.Name.StartsWith("Before"); IsAfter = instance.GetType().BaseType.Name.StartsWith("After"); if (IsAfter || IsBefore) return; IsSurround = true; }
public ElementInstance(ILinkElement instance) { this.instance = instance; invoker = CreateInvoker(instance); // You would do it smarter IsBefore = instance.GetType().BaseType.Name.StartsWith("Before"); IsAfter = instance.GetType().BaseType.Name.StartsWith("After"); if (IsAfter || IsBefore) { return; } IsSurround = true; }