public JSElementArray(ClientPortBase clientPort, string getCommand) { if (clientPort == null) throw new ArgumentNullException("clientPort"); if (getCommand == null) throw new ArgumentNullException("getCommand"); ClientPort = clientPort; GetCommand = getCommand; }
protected JSElementCollectionBase(ClientPortBase clientPort, string containerReference) { if (clientPort == null) throw new ArgumentNullException("clientPort"); if (containerReference == null) throw new ArgumentNullException("containerReference"); this.clientPort = clientPort; this.containerReference = containerReference; }
public JSElement(ClientPortBase clientPort, string elementReference) { if (clientPort == null) { throw new ArgumentNullException("clientPort"); } if (elementReference == null) { throw new ArgumentNullException("elementReference"); } ClientPort = clientPort; ElementReference = elementReference; }
protected JSElementCollectionBase(ClientPortBase clientPort, string containerReference) { if (clientPort == null) { throw new ArgumentNullException("clientPort"); } if (containerReference == null) { throw new ArgumentNullException("containerReference"); } this.clientPort = clientPort; this.containerReference = containerReference; }
public JSElementArray(ClientPortBase clientPort, string getCommand) { if (clientPort == null) { throw new ArgumentNullException("clientPort"); } if (getCommand == null) { throw new ArgumentNullException("getCommand"); } this.ClientPort = clientPort; this.GetCommand = getCommand; }
public static IEnumerable<JSElement> ElementArrayEnumerator(string getElementsCommand, ClientPortBase clientPort) { var ElementArrayName = clientPort.CreateVariableName(); var numberOfElements = GetNumberOfElements(getElementsCommand, clientPort, ElementArrayName); try { for (var index = 0; index < numberOfElements; index++) { var indexedElementVariableName = string.Concat(ElementArrayName, "[", index.ToString(), "]"); var ffElement = new JSElement(clientPort, indexedElementVariableName); yield return ffElement; } } finally { DeleteElementArray(ElementArrayName, clientPort); } }
private static void DeleteElementArray(string elementName, ClientPortBase clientPort) { var command = string.Format("delete {0};", elementName); clientPort.Write(command); }
/// <summary> /// Initializes a new instance of the <see cref="JSBrowserBase"/> class. /// </summary> /// <param name="clientPort">The client port.</param> protected JSBrowserBase(ClientPortBase clientPort) { ClientPort = clientPort; }
/// <summary> /// Initializes a new instance of the <see cref="JSBrowserBase"/> class. /// </summary> /// <param name="clientPort">The client port.</param> protected JSBrowserBase(ClientPortBase clientPort) { ClientPort = clientPort; }
/// <summary> /// Initializes a new instance of the <see cref="JSBrowserBase"/> class. /// </summary> /// <param name="clientPort">The client port.</param> public JSBrowserBase(ClientPortBase clientPort) { this.ClientPort = clientPort; }
private static int GetNumberOfElements(string getElementsCommand, ClientPortBase clientPort, string elementArrayName) { var command = string.Format("{0}={1}; {0}.length;", elementArrayName, getElementsCommand); return(clientPort.WriteAndReadAsInt(command)); }
private static void DeleteElementArray(string elementName, ClientPortBase clientPort) { var command = string.Format("delete {0};", elementName); clientPort.Write(command); }
public wrappedJSElement(ClientPortBase clientPort, string elementReference) : base(clientPort, elementReference) { }
public WrappedJSElementCollection(ClientPortBase clientPort, string containerReference) : base(clientPort, containerReference) { }
public JSEventCreator(string elementReference, ClientPortBase clientPortBase) { _elementReference = elementReference; _clientPortBase = clientPortBase; }
private static int GetNumberOfElements(string getElementsCommand, ClientPortBase clientPort, string elementArrayName) { var command = string.Format("{0}={1}; {0}.length;", elementArrayName, getElementsCommand); return clientPort.WriteAndReadAsInt(command); }
public static IEnumerable <JSElement> ElementArrayEnumerator(string getElementsCommand, ClientPortBase clientPort) { var ElementArrayName = clientPort.CreateVariableName(); var numberOfElements = GetNumberOfElements(getElementsCommand, clientPort, ElementArrayName); try { for (var index = 0; index < numberOfElements; index++) { var indexedElementVariableName = string.Concat(ElementArrayName, "[", index.ToString(), "]"); var ffElement = new JSElement(clientPort, indexedElementVariableName); yield return(ffElement); } } finally { DeleteElementArray(ElementArrayName, clientPort); } }
/// <summary> /// Initializes a new instance of the <see cref="JSBrowserBase"/> class. /// </summary> /// <param name="clientPort">The client port.</param> public JSBrowserBase(ClientPortBase clientPort) { ClientPort = clientPort; }