System.Windows.Automation.Text.TextPatternRange.Wrap C# (CSharp) 메소드

Wrap() 정적인 개인적인 메소드

static private Wrap ( UIAutomationClient range, TextPattern pattern ) : TextPatternRange
range UIAutomationClient
pattern TextPattern
리턴 TextPatternRange
        internal static TextPatternRange Wrap(UIAutomationClient.IUIAutomationTextRange range, TextPattern pattern)
        {
            Debug.Assert(pattern != null);
            if (range == null)
            {
                return null;
            }
            else
            {
                return new TextPatternRange(range, pattern);
            }
        }

Same methods

TextPatternRange::Wrap ( UIAutomationClient ranges, TextPattern pattern ) : System.Windows.Automation.Text.TextPatternRange[]

Usage Example

예제 #1
0
 public TextPatternRange FindAttribute(AutomationTextAttribute attribute, object value, bool backward)
 {
     Utility.ValidateArgumentNonNull(attribute, "attribute");
     Utility.ValidateArgumentNonNull(value, "value");
     if ((attribute == TextPattern.CultureAttribute) && (value is CultureInfo))
     {
         value = ((CultureInfo)value).LCID;
     }
     try
     {
         return(TextPatternRange.Wrap(
                    this._range.FindAttribute(attribute.Id, value, Utility.ConvertToInt(backward)), this._pattern));
     }
     catch (System.Runtime.InteropServices.COMException e)
     {
         Exception newEx; if (Utility.ConvertException(e, out newEx))
         {
             throw newEx;
         }
         else
         {
             throw;
         }
     }
 }
All Usage Examples Of System.Windows.Automation.Text.TextPatternRange::Wrap