Inheritance: IInvokePattern
Ejemplo n.º 1
0
        public object GetCurrentPattern(AutomationPattern pattern)
        {
            ArgumentCheck.NotNull(pattern, "pattern");

            var patternProvider = provider.GetPatternProvider(pattern.Id);

            if (patternProvider == null)
            {
                throw new InvalidOperationException();
            }
            object ret = null;

            if (pattern == InvokePattern.Pattern)
            {
                ret = new ClientInvokePattern((IInvokeProvider)patternProvider);
            }
            // TODO implement
            // we still have more pattern to implement
            else
            {
                throw new System.InvalidOperationException();
            }
            return(ret);
        }
Ejemplo n.º 2
0
		public object GetCurrentPattern (AutomationPattern pattern)
		{
			ArgumentCheck.NotNull (pattern, "pattern");

			var patternProvider = provider.GetPatternProvider (pattern.Id);
			if (patternProvider == null)
				throw new InvalidOperationException ();
			object ret = null;
			if (pattern == InvokePattern.Pattern)
				ret = new ClientInvokePattern ((IInvokeProvider) patternProvider);
			// TODO implement
			// we still have more pattern to implement
			else
				throw new System.InvalidOperationException ();
			return ret;
		}