ManagedUiaCustomizationCore.CustomPatternSchemaBase.GetMemberByIndex C# (CSharp) 메소드

GetMemberByIndex() 공개 메소드

public GetMemberByIndex ( uint index ) : ISchemaMember
index uint
리턴 ISchemaMember
        public ISchemaMember GetMemberByIndex(uint index)
        {
            if (!_registered)
                throw new InvalidOperationException("Pattern schema should be registered first");

            ISchemaMember result;
            if (_members.TryGetValue(index, out result))
                return result;
            return null;
        }

Usage Example

        public void Dispatch(object pTarget, uint index, UIAutomationParameter[] pParams, uint cParams)
        {
            ISchemaMember dispatchingMember = _schema.GetMemberByIndex(index);

            if (dispatchingMember == null)
            {
                throw new NotSupportedException("Dispatching of this method is not supported");
            }

            dispatchingMember.DispatchCallToProvider(pTarget, new UiaParameterListHelper(pParams));
        }