Beispiel #1
0
        internal static bool IsValidChild(ITextPointer position, Type childType)
        {
            // Disallow nested hyperlink elements.
            if (typeof(TextElement).IsAssignableFrom(position.ParentType) &&
                TextPointerBase.IsInHyperlinkScope(position))
            {
                if (typeof(Hyperlink).IsAssignableFrom(childType) ||
                    typeof(AnchoredBlock).IsAssignableFrom(childType))
                {
                    return(false);
                }
            }

            return(IsValidChild(position.ParentType, childType));
        }
 // Token: 0x06003BE9 RID: 15337 RVA: 0x0011438C File Offset: 0x0011258C
 internal static bool IsValidChild(ITextPointer position, Type childType)
 {
     return((!typeof(TextElement).IsAssignableFrom(position.ParentType) || !TextPointerBase.IsInHyperlinkScope(position) || (!typeof(Hyperlink).IsAssignableFrom(childType) && !typeof(AnchoredBlock).IsAssignableFrom(childType))) && TextSchema.IsValidChild(position.ParentType, childType));
 }