AsyncDolls.AsyncDollsPartial.ElementInstance.ElementInstance C# (CSharp) Method

ElementInstance() public method

public ElementInstance ( ILinkElement instance ) : System
instance ILinkElement
return System
        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;
        }