storyPointIsNew) { this._ignoreIFrame = true; this._historyPointIsNew = false; var frameDoc = this._historyFrame.contentWindow.document; frameDoc.open("javascript:''"); frameDoc.write("" + (title || document.title) + "parent.Sys.Application._onIFrameLoad('" + entry + "');"); frameDoc.close(); } this._ignoreTimer = false; var currentHash = this.get_stateString(); this._currentEntry = entry; if (entry !== currentHash) { var loc = document.location; if (loc.href.length - loc.hash.length + entry.length > 1024) { throw Error.invalidOperation(Sys.Res.urlMustBeLessThan1024chars); } if (this._isSafari2()) { var history = this._getHistory(); history[window.history.length - this._historyInitialLength + 1] = entry; this._setHistory(history); this._historyLength = window.history.length + 1; var form = document.createElement('form'); form.method = 'get'; form.action = '#' + entry; document.appendChild(form); form.submit(); document.removeChild(form); } else { window.location.hash = entry; } if ((typeof(title) !== 'undefined') && (title !== null)) { document.title = title; } } } } function Sys$_Application$_unloadHandler(event) { this.dispose(); } function Sys$_Application$_updateHiddenField(value) { if (this._clientId) { var serverStateField = document.getElementById(this._clientId); if (serverStateField) { serverStateField.value = value; } } } Sys._Application.prototype = { _creatingComponents: false, _disposing: false, get_isCreatingComponents: Sys$_Application$get_isCreatingComponents, get_stateString: Sys$_Application$get_stateString, get_enableHistory: Sys$_Application$get_enableHistory, set_enableHistory: Sys$_Application$set_enableHistory, add_init: Sys$_Application$add_init, remove_init: Sys$_Application$remove_init, add_load: Sys$_Application$add_load, remove_load: Sys$_Application$remove_load, add_navigate: Sys$_Application$add_navigate, remove_navigate: Sys$_Application$remove_navigate, add_unload: Sys$_Application$add_unload, remove_unload: Sys$_Application$remove_unload, addComponent: Sys$_Application$addComponent, addHistoryPoint: Sys$_Application$addHistoryPoint, beginCreateComponents: Sys$_Application$beginCreateComponents, dispose: Sys$_Application$dispose, endCreateComponents: Sys$_Application$endCreateComponents, findComponent: Sys$_Application$findComponent, getComponents: Sys$_Application$getComponents, initialize: Sys$_Application$initialize, notifyScriptLoaded: Sys$_Application$notifyScriptLoaded, registerDisposableObject: Sys$_Application$registerDisposableObject, raiseLoad: Sys$_Application$raiseLoad, removeComponent: Sys$_Application$removeComponent, setServerId: Sys$_Application$setServerId, setServerState: Sys$_Application$setServerState, unregisterDisposableObject: Sys$_Application$unregisterDisposableObject, _addComponentToSecondPass: Sys$_Application$_addComponentToSecondPass, _deserializeState: Sys$_Application$_deserializeState, _doInitialize: Sys$_Application$_doInitialize, _enableHistoryInScriptManager: Sys$_Application$_enableHistoryInScriptManager, _ensureHistory: Sys$_Application$_ensureHistory, _getHistory: Sys$_Application$_getHistory, _isSafari2: Sys$_Application$_isSafari2, _loadHandler: Sys$_Application$_loadHandler, _navigate: Sys$_Application$_navigate, _onIdle: Sys$_Application$_onIdle, _onIFrameLoad: Sys$_Application$_onIFrameLoad, _onPageRequestManagerBeginRequest: Sys$_Application$_onPageRequestManagerBeginRequest, _onPageRequestManagerEndRequest: Sys$_Application$_onPageRequestManagerEndRequest, _raiseNavigate: Sys$_Application$_raiseNavigate, _serializeState: Sys$_Application$_serializeState, _setHistory: Sys$_Application$_setHistory, _setState: Sys$_Application$_setState, _unloadHandler: Sys$_Application$_unloadHandler, _updateHiddenField: Sys$_Application$_updateHiddenField } Sys._Application.registerClass('Sys._Application', Sys.Component, Sys.IContainer); Sys.Application = new Sys._Application(); var $find = Sys.Application.findComponent; Type.registerNamespace('Sys.Net'); Sys.Net.WebRequestExecutor = function Sys$Net$WebRequestExecutor() { /// if (arguments.length !== 0) throw Error.parameterCount(); this._webRequest = null; this._resultObject = null; } function Sys$Net$WebRequestExecutor$get_webRequest() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._webRequest; } function Sys$Net$WebRequestExecutor$_set_webRequest(value) { if (this.get_started()) { throw Error.invalidOperation(String.format(Sys.Res.cannotCallOnceStarted, 'set_webRequest')); } this._webRequest = value; } function Sys$Net$WebRequestExecutor$get_started() { /// if (arguments.length !== 0) throw Error.parameterCount(); throw Error.notImplemented(); } function Sys$Net$WebRequestExecutor$get_responseAvailable() { /// if (arguments.length !== 0) throw Error.parameterCount(); throw Error.notImplemented(); } function Sys$Net$WebRequestExecutor$get_timedOut() { /// if (arguments.length !== 0) throw Error.parameterCount(); throw Error.notImplemented(); } function Sys$Net$WebRequestExecutor$get_aborted() { /// if (arguments.length !== 0) throw Error.parameterCount(); throw Error.notImplemented(); } function Sys$Net$WebRequestExecutor$get_responseData() { /// if (arguments.length !== 0) throw Error.parameterCount(); throw Error.notImplemented(); } function Sys$Net$WebRequestExecutor$get_statusCode() { /// if (arguments.length !== 0) throw Error.parameterCount(); throw Error.notImplemented(); } function Sys$Net$WebRequestExecutor$get_statusText() { /// if (arguments.length !== 0) throw Error.parameterCount(); throw Error.notImplemented(); } function Sys$Net$WebRequestExecutor$get_xml() { /// if (arguments.length !== 0) throw Error.parameterCount(); throw Error.notImplemented(); } function Sys$Net$WebRequestExecutor$get_object() { /// if (arguments.length !== 0) throw Error.parameterCount(); if (!this._resultObject) { this._resultObject = Sys.Serialization.JavaScriptSerializer.deserialize(this.get_responseData()); } return this._resultObject; } function Sys$Net$WebRequestExecutor$executeRequest() { /// if (arguments.length !== 0) throw Error.parameterCount(); throw Error.notImplemented(); } function Sys$Net$WebRequestExecutor$abort() { /// if (arguments.length !== 0) throw Error.parameterCount(); throw Error.notImplemented(); } function Sys$Net$WebRequestExecutor$getResponseHeader(header) { /// /// var e = Function._validateParams(arguments, [ {name: "header", type: String} ]); if (e) throw e; throw Error.notImplemented(); } function Sys$Net$WebRequestExecutor$getAllResponseHeaders() { /// if (arguments.length !== 0) throw Error.parameterCount(); throw Error.notImplemented(); } Sys.Net.WebRequestExecutor.prototype = { get_webRequest: Sys$Net$WebRequestExecutor$get_webRequest, _set_webRequest: Sys$Net$WebRequestExecutor$_set_webRequest, get_started: Sys$Net$WebRequestExecutor$get_started, get_responseAvailable: Sys$Net$WebRequestExecutor$get_responseAvailable, get_timedOut: Sys$Net$WebRequestExecutor$get_timedOut, get_aborted: Sys$Net$WebRequestExecutor$get_aborted, get_responseData: Sys$Net$WebRequestExecutor$get_responseData, get_statusCode: Sys$Net$WebRequestExecutor$get_statusCode, get_statusText: Sys$Net$WebRequestExecutor$get_statusText, get_xml: Sys$Net$WebRequestExecutor$get_xml, get_object: Sys$Net$WebRequestExecutor$get_object, executeRequest: Sys$Net$WebRequestExecutor$executeRequest, abort: Sys$Net$WebRequestExecutor$abort, getResponseHeader: Sys$Net$WebRequestExecutor$getResponseHeader, getAllResponseHeaders: Sys$Net$WebRequestExecutor$getAllResponseHeaders } Sys.Net.WebRequestExecutor.registerClass('Sys.Net.WebRequestExecutor'); Sys.Net.XMLDOM = function Sys$Net$XMLDOM(markup) { /// /// var e = Function._validateParams(arguments, [ {name: "markup", type: String} ]); if (e) throw e; if (!window.DOMParser) { var progIDs = [ 'Msxml2.DOMDocument.3.0', 'Msxml2.DOMDocument' ]; for (var i = 0, l = progIDs.length; i < l; i++) { try { var xmlDOM = new ActiveXObject(progIDs[i]); xmlDOM.async = false; xmlDOM.loadXML(markup); xmlDOM.setProperty('SelectionLanguage', 'XPath'); return xmlDOM; } catch (ex) { } } } else { try { var domParser = new window.DOMParser(); return domParser.parseFromString(markup, 'text/xml'); } catch (ex) { } } return null; } Sys.Net.XMLHttpExecutor = function Sys$Net$XMLHttpExecutor() { /// if (arguments.length !== 0) throw Error.parameterCount(); Sys.Net.XMLHttpExecutor.initializeBase(this); var _this = this; this._xmlHttpRequest = null; this._webRequest = null; this._responseAvailable = false; this._timedOut = false; this._timer = null; this._aborted = false; this._started = false; this._onReadyStateChange = (function () { if (_this._xmlHttpRequest.readyState === 4 ) { try { if (typeof(_this._xmlHttpRequest.status) === "undefined") { return; } } catch(ex) { return; } _this._clearTimer(); _this._responseAvailable = true; try { _this._webRequest.completed(Sys.EventArgs.Empty); } finally { if (_this._xmlHttpRequest != null) { _this._xmlHttpRequest.onreadystatechange = Function.emptyMethod; _this._xmlHttpRequest = null; } } } }); this._clearTimer = (function() { if (_this._timer != null) { window.clearTimeout(_this._timer); _this._timer = null; } }); this._onTimeout = (function() { if (!_this._responseAvailable) { _this._clearTimer(); _this._timedOut = true; _this._xmlHttpRequest.onreadystatechange = Function.emptyMethod; _this._xmlHttpRequest.abort(); _this._webRequest.completed(Sys.EventArgs.Empty); _this._xmlHttpRequest = null; } }); } function Sys$Net$XMLHttpExecutor$get_timedOut() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._timedOut; } function Sys$Net$XMLHttpExecutor$get_started() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._started; } function Sys$Net$XMLHttpExecutor$get_responseAvailable() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._responseAvailable; } function Sys$Net$XMLHttpExecutor$get_aborted() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._aborted; } function Sys$Net$XMLHttpExecutor$executeRequest() { /// if (arguments.length !== 0) throw Error.parameterCount(); this._webRequest = this.get_webRequest(); if (this._started) { throw Error.invalidOperation(String.format(Sys.Res.cannotCallOnceStarted, 'executeRequest')); } if (this._webRequest === null) { throw Error.invalidOperation(Sys.Res.nullWebRequest); } var body = this._webRequest.get_body(); var headers = this._webRequest.get_headers(); this._xmlHttpRequest = new XMLHttpRequest(); this._xmlHttpRequest.onreadystatechange = this._onReadyStateChange; var verb = this._webRequest.get_httpVerb(); this._xmlHttpRequest.open(verb, this._webRequest.getResolvedUrl(), true ); if (headers) { for (var header in headers) { var val = headers[header]; if (typeof(val) !== "function") this._xmlHttpRequest.setRequestHeader(header, val); } } if (verb.toLowerCase() === "post") { if ((headers === null) || !headers['Content-Type']) { this._xmlHttpRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=utf-8'); } if (!body) { body = ""; } } var timeout = this._webRequest.get_timeout(); if (timeout > 0) { this._timer = window.setTimeout(Function.createDelegate(this, this._onTimeout), timeout); } this._xmlHttpRequest.send(body); this._started = true; } function Sys$Net$XMLHttpExecutor$getResponseHeader(header) { /// /// /// var e = Function._validateParams(arguments, [ {name: "header", type: String} ]); if (e) throw e; if (!this._responseAvailable) { throw Error.invalidOperation(String.format(Sys.Res.cannotCallBeforeResponse, 'getResponseHeader')); } if (!this._xmlHttpRequest) { throw Error.invalidOperation(String.format(Sys.Res.cannotCallOutsideHandler, 'getResponseHeader')); } var result; try { result = this._xmlHttpRequest.getResponseHeader(header); } catch (e) { } if (!result) result = ""; return result; } function Sys$Net$XMLHttpExecutor$getAllResponseHeaders() { /// /// if (arguments.length !== 0) throw Error.parameterCount(); if (!this._responseAvailable) { throw Error.invalidOperation(String.format(Sys.Res.cannotCallBeforeResponse, 'getAllResponseHeaders')); } if (!this._xmlHttpRequest) { throw Error.invalidOperation(String.format(Sys.Res.cannotCallOutsideHandler, 'getAllResponseHeaders')); } return this._xmlHttpRequest.getAllResponseHeaders(); } function Sys$Net$XMLHttpExecutor$get_responseData() { /// if (arguments.length !== 0) throw Error.parameterCount(); if (!this._responseAvailable) { throw Error.invalidOperation(String.format(Sys.Res.cannotCallBeforeResponse, 'get_responseData')); } if (!this._xmlHttpRequest) { throw Error.invalidOperation(String.format(Sys.Res.cannotCallOutsideHandler, 'get_responseData')); } return this._xmlHttpRequest.responseText; } function Sys$Net$XMLHttpExecutor$get_statusCode() { /// if (arguments.length !== 0) throw Error.parameterCount(); if (!this._responseAvailable) { throw Error.invalidOperation(String.format(Sys.Res.cannotCallBeforeResponse, 'get_statusCode')); } if (!this._xmlHttpRequest) { throw Error.invalidOperation(String.format(Sys.Res.cannotCallOutsideHandler, 'get_statusCode')); } var result = 0; try { result = this._xmlHttpRequest.status; } catch(ex) { } return result; } function Sys$Net$XMLHttpExecutor$get_statusText() { /// if (arguments.length !== 0) throw Error.parameterCount(); if (!this._responseAvailable) { throw Error.invalidOperation(String.format(Sys.Res.cannotCallBeforeResponse, 'get_statusText')); } if (!this._xmlHttpRequest) { throw Error.invalidOperation(String.format(Sys.Res.cannotCallOutsideHandler, 'get_statusText')); } return this._xmlHttpRequest.statusText; } function Sys$Net$XMLHttpExecutor$get_xml() { /// if (arguments.length !== 0) throw Error.parameterCount(); if (!this._responseAvailable) { throw Error.invalidOperation(String.format(Sys.Res.cannotCallBeforeResponse, 'get_xml')); } if (!this._xmlHttpRequest) { throw Error.invalidOperation(String.format(Sys.Res.cannotCallOutsideHandler, 'get_xml')); } var xml = this._xmlHttpRequest.responseXML; if (!xml || !xml.documentElement) { xml = Sys.Net.XMLDOM(this._xmlHttpRequest.responseText); if (!xml || !xml.documentElement) return null; } else if (navigator.userAgent.indexOf('MSIE') !== -1) { xml.setProperty('SelectionLanguage', 'XPath'); } if (xml.documentElement.namespaceURI === "http://www.mozilla.org/newlayout/xml/parsererror.xml" && xml.documentElement.tagName === "parsererror") { return null; } if (xml.documentElement.firstChild && xml.documentElement.firstChild.tagName === "parsererror") { return null; } return xml; } function Sys$Net$XMLHttpExecutor$abort() { /// if (arguments.length !== 0) throw Error.parameterCount(); if (!this._started) { throw Error.invalidOperation(Sys.Res.cannotAbortBeforeStart); } if (this._aborted || this._responseAvailable || this._timedOut) return; this._aborted = true; this._clearTimer(); if (this._xmlHttpRequest && !this._responseAvailable) { this._xmlHttpRequest.onreadystatechange = Function.emptyMethod; this._xmlHttpRequest.abort(); this._xmlHttpRequest = null; this._webRequest.completed(Sys.EventArgs.Empty); } } Sys.Net.XMLHttpExecutor.prototype = { get_timedOut: Sys$Net$XMLHttpExecutor$get_timedOut, get_started: Sys$Net$XMLHttpExecutor$get_started, get_responseAvailable: Sys$Net$XMLHttpExecutor$get_responseAvailable, get_aborted: Sys$Net$XMLHttpExecutor$get_aborted, executeRequest: Sys$Net$XMLHttpExecutor$executeRequest, getResponseHeader: Sys$Net$XMLHttpExecutor$getResponseHeader, getAllResponseHeaders: Sys$Net$XMLHttpExecutor$getAllResponseHeaders, get_responseData: Sys$Net$XMLHttpExecutor$get_responseData, get_statusCode: Sys$Net$XMLHttpExecutor$get_statusCode, get_statusText: Sys$Net$XMLHttpExecutor$get_statusText, get_xml: Sys$Net$XMLHttpExecutor$get_xml, abort: Sys$Net$XMLHttpExecutor$abort } Sys.Net.XMLHttpExecutor.registerClass('Sys.Net.XMLHttpExecutor', Sys.Net.WebRequestExecutor); Sys.Net._WebRequestManager = function Sys$Net$_WebRequestManager() { /// if (arguments.length !== 0) throw Error.parameterCount(); this._defaultTimeout = 0; this._defaultExecutorType = "Sys.Net.XMLHttpExecutor"; } function Sys$Net$_WebRequestManager$add_invokingRequest(handler) { /// var e = Function._validateParams(arguments, [{name: "handler", type: Function}]); if (e) throw e; this._get_eventHandlerList().addHandler("invokingRequest", handler); } function Sys$Net$_WebRequestManager$remove_invokingRequest(handler) { var e = Function._validateParams(arguments, [{name: "handler", type: Function}]); if (e) throw e; this._get_eventHandlerList().removeHandler("invokingRequest", handler); } function Sys$Net$_WebRequestManager$add_completedRequest(handler) { /// var e = Function._validateParams(arguments, [{name: "handler", type: Function}]); if (e) throw e; this._get_eventHandlerList().addHandler("completedRequest", handler); } function Sys$Net$_WebRequestManager$remove_completedRequest(handler) { var e = Function._validateParams(arguments, [{name: "handler", type: Function}]); if (e) throw e; this._get_eventHandlerList().removeHandler("completedRequest", handler); } function Sys$Net$_WebRequestManager$_get_eventHandlerList() { if (!this._events) { this._events = new Sys.EventHandlerList(); } return this._events; } function Sys$Net$_WebRequestManager$get_defaultTimeout() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._defaultTimeout; } function Sys$Net$_WebRequestManager$set_defaultTimeout(value) { var e = Function._validateParams(arguments, [{name: "value", type: Number}]); if (e) throw e; if (value < 0) { throw Error.argumentOutOfRange("value", value, Sys.Res.invalidTimeout); } this._defaultTimeout = value; } function Sys$Net$_WebRequestManager$get_defaultExecutorType() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._defaultExecutorType; } function Sys$Net$_WebRequestManager$set_defaultExecutorType(value) { var e = Function._validateParams(arguments, [{name: "value", type: String}]); if (e) throw e; this._defaultExecutorType = value; } function Sys$Net$_WebRequestManager$executeRequest(webRequest) { /// /// var e = Function._validateParams(arguments, [ {name: "webRequest", type: Sys.Net.WebRequest} ]); if (e) throw e; var executor = webRequest.get_executor(); if (!executor) { var failed = false; try { var executorType = eval(this._defaultExecutorType); executor = new executorType(); } catch (e) { failed = true; } if (failed || !Sys.Net.WebRequestExecutor.isInstanceOfType(executor) || !executor) { throw Error.argument("defaultExecutorType", String.format(Sys.Res.invalidExecutorType, this._defaultExecutorType)); } webRequest.set_executor(executor); } if (executor.get_aborted()) { return; } var evArgs = new Sys.Net.NetworkRequestEventArgs(webRequest); var handler = this._get_eventHandlerList().getHandler("invokingRequest"); if (handler) { handler(this, evArgs); } if (!evArgs.get_cancel()) { executor.executeRequest(); } } Sys.Net._WebRequestManager.prototype = { add_invokingRequest: Sys$Net$_WebRequestManager$add_invokingRequest, remove_invokingRequest: Sys$Net$_WebRequestManager$remove_invokingRequest, add_completedRequest: Sys$Net$_WebRequestManager$add_completedRequest, remove_completedRequest: Sys$Net$_WebRequestManager$remove_completedRequest, _get_eventHandlerList: Sys$Net$_WebRequestManager$_get_eventHandlerList, get_defaultTimeout: Sys$Net$_WebRequestManager$get_defaultTimeout, set_defaultTimeout: Sys$Net$_WebRequestManager$set_defaultTimeout, get_defaultExecutorType: Sys$Net$_WebRequestManager$get_defaultExecutorType, set_defaultExecutorType: Sys$Net$_WebRequestManager$set_defaultExecutorType, executeRequest: Sys$Net$_WebRequestManager$executeRequest } Sys.Net._WebRequestManager.registerClass('Sys.Net._WebRequestManager'); Sys.Net.WebRequestManager = new Sys.Net._WebRequestManager(); Sys.Net.NetworkRequestEventArgs = function Sys$Net$NetworkRequestEventArgs(webRequest) { /// /// var e = Function._validateParams(arguments, [ {name: "webRequest", type: Sys.Net.WebRequest} ]); if (e) throw e; Sys.Net.NetworkRequestEventArgs.initializeBase(this); this._webRequest = webRequest; } function Sys$Net$NetworkRequestEventArgs$get_webRequest() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._webRequest; } Sys.Net.NetworkRequestEventArgs.prototype = { get_webRequest: Sys$Net$NetworkRequestEventArgs$get_webRequest } Sys.Net.NetworkRequestEventArgs.registerClass('Sys.Net.NetworkRequestEventArgs', Sys.CancelEventArgs); Sys.Net.WebRequest = function Sys$Net$WebRequest() { /// if (arguments.length !== 0) throw Error.parameterCount(); this._url = ""; this._headers = { }; this._body = null; this._userContext = null; this._httpVerb = null; this._executor = null; this._invokeCalled = false; this._timeout = 0; } function Sys$Net$WebRequest$add_completed(handler) { /// var e = Function._validateParams(arguments, [{name: "handler", type: Function}]); if (e) throw e; this._get_eventHandlerList().addHandler("completed", handler); } function Sys$Net$WebRequest$remove_completed(handler) { var e = Function._validateParams(arguments, [{name: "handler", type: Function}]); if (e) throw e; this._get_eventHandlerList().removeHandler("completed", handler); } function Sys$Net$WebRequest$completed(eventArgs) { /// /// var e = Function._validateParams(arguments, [ {name: "eventArgs", type: Sys.EventArgs} ]); if (e) throw e; var handler = Sys.Net.WebRequestManager._get_eventHandlerList().getHandler("completedRequest"); if (handler) { handler(this._executor, eventArgs); } handler = this._get_eventHandlerList().getHandler("completed"); if (handler) { handler(this._executor, eventArgs); } } function Sys$Net$WebRequest$_get_eventHandlerList() { if (!this._events) { this._events = new Sys.EventHandlerList(); } return this._events; } function Sys$Net$WebRequest$get_url() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._url; } function Sys$Net$WebRequest$set_url(value) { var e = Function._validateParams(arguments, [{name: "value", type: String}]); if (e) throw e; this._url = value; } function Sys$Net$WebRequest$get_headers() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._headers; } function Sys$Net$WebRequest$get_httpVerb() { /// if (arguments.length !== 0) throw Error.parameterCount(); if (this._httpVerb === null) { if (this._body === null) { return "GET"; } return "POST"; } return this._httpVerb; } function Sys$Net$WebRequest$set_httpVerb(value) { var e = Function._validateParams(arguments, [{name: "value", type: String}]); if (e) throw e; if (value.length === 0) { throw Error.argument('value', Sys.Res.invalidHttpVerb); } this._httpVerb = value; } function Sys$Net$WebRequest$get_body() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._body; } function Sys$Net$WebRequest$set_body(value) { var e = Function._validateParams(arguments, [{name: "value", mayBeNull: true}]); if (e) throw e; this._body = value; } function Sys$Net$WebRequest$get_userContext() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._userContext; } function Sys$Net$WebRequest$set_userContext(value) { var e = Function._validateParams(arguments, [{name: "value", mayBeNull: true}]); if (e) throw e; this._userContext = value; } function Sys$Net$WebRequest$get_executor() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._executor; } function Sys$Net$WebRequest$set_executor(value) { var e = Function._validateParams(arguments, [{name: "value", type: Sys.Net.WebRequestExecutor}]); if (e) throw e; if (this._executor !== null && this._executor.get_started()) { throw Error.invalidOperation(Sys.Res.setExecutorAfterActive); } this._executor = value; this._executor._set_webRequest(this); } function Sys$Net$WebRequest$get_timeout() { /// if (arguments.length !== 0) throw Error.parameterCount(); if (this._timeout === 0) { return Sys.Net.WebRequestManager.get_defaultTimeout(); } return this._timeout; } function Sys$Net$WebRequest$set_timeout(value) { var e = Function._validateParams(arguments, [{name: "value", type: Number}]); if (e) throw e; if (value < 0) { throw Error.argumentOutOfRange("value", value, Sys.Res.invalidTimeout); } this._timeout = value; } function Sys$Net$WebRequest$getResolvedUrl() { /// /// if (arguments.length !== 0) throw Error.parameterCount(); return Sys.Net.WebRequest._resolveUrl(this._url); } function Sys$Net$WebRequest$invoke() { /// if (arguments.length !== 0) throw Error.parameterCount(); if (this._invokeCalled) { throw Error.invalidOperation(Sys.Res.invokeCalledTwice); } Sys.Net.WebRequestManager.executeRequest(this); this._invokeCalled = true; } Sys.Net.WebRequest.prototype = { add_completed: Sys$Net$WebRequest$add_completed, remove_completed: Sys$Net$WebRequest$remove_completed, completed: Sys$Net$WebRequest$completed, _get_eventHandlerList: Sys$Net$WebRequest$_get_eventHandlerList, get_url: Sys$Net$WebRequest$get_url, set_url: Sys$Net$WebRequest$set_url, get_headers: Sys$Net$WebRequest$get_headers, get_httpVerb: Sys$Net$WebRequest$get_httpVerb, set_httpVerb: Sys$Net$WebRequest$set_httpVerb, get_body: Sys$Net$WebRequest$get_body, set_body: Sys$Net$WebRequest$set_body, get_userContext: Sys$Net$WebRequest$get_userContext, set_userContext: Sys$Net$WebRequest$set_userContext, get_executor: Sys$Net$WebRequest$get_executor, set_executor: Sys$Net$WebRequest$set_executor, get_timeout: Sys$Net$WebRequest$get_timeout, set_timeout: Sys$Net$WebRequest$set_timeout, getResolvedUrl: Sys$Net$WebRequest$getResolvedUrl, invoke: Sys$Net$WebRequest$invoke } Sys.Net.WebRequest._resolveUrl = function Sys$Net$WebRequest$_resolveUrl(url, baseUrl) { if (url && url.indexOf('://') !== -1) { return url; } if (!baseUrl || baseUrl.length === 0) { var baseElement = document.getElementsByTagName('base')[0]; if (baseElement && baseElement.href && baseElement.href.length > 0) { baseUrl = baseElement.href; } else { baseUrl = document.URL; } } var qsStart = baseUrl.indexOf('?'); if (qsStart !== -1) { baseUrl = baseUrl.substr(0, qsStart); } qsStart = baseUrl.indexOf('#'); if (qsStart !== -1) { baseUrl = baseUrl.substr(0, qsStart); } baseUrl = baseUrl.substr(0, baseUrl.lastIndexOf('/') + 1); if (!url || url.length === 0) { return baseUrl; } if (url.charAt(0) === '/') { var slashslash = baseUrl.indexOf('://'); if (slashslash === -1) { throw Error.argument("baseUrl", Sys.Res.badBaseUrl1); } var nextSlash = baseUrl.indexOf('/', slashslash + 3); if (nextSlash === -1) { throw Error.argument("baseUrl", Sys.Res.badBaseUrl2); } return baseUrl.substr(0, nextSlash) + url; } else { var lastSlash = baseUrl.lastIndexOf('/'); if (lastSlash === -1) { throw Error.argument("baseUrl", Sys.Res.badBaseUrl3); } return baseUrl.substr(0, lastSlash+1) + url; } } Sys.Net.WebRequest._createQueryString = function Sys$Net$WebRequest$_createQueryString(queryString, encodeMethod) { if (!encodeMethod) encodeMethod = encodeURIComponent; var sb = new Sys.StringBuilder(); var i = 0; for (var arg in queryString) { var obj = queryString[arg]; if (typeof(obj) === "function") continue; var val = Sys.Serialization.JavaScriptSerializer.serialize(obj); if (i !== 0) { sb.append('&'); } sb.append(arg); sb.append('='); sb.append(encodeMethod(val)); i++; } return sb.toString(); } Sys.Net.WebRequest._createUrl = function Sys$Net$WebRequest$_createUrl(url, queryString) { if (!queryString) { return url; } var qs = Sys.Net.WebRequest._createQueryString(queryString); if (qs.length > 0) { var sep = '?'; if (url && url.indexOf('?') !== -1) sep = '&'; return url + sep + qs; } else { return url; } } Sys.Net.WebRequest.registerClass('Sys.Net.WebRequest'); Sys.Net.WebServiceProxy = function Sys$Net$WebServiceProxy() { } function Sys$Net$WebServiceProxy$get_timeout() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._timeout; } function Sys$Net$WebServiceProxy$set_timeout(value) { var e = Function._validateParams(arguments, [{name: "value", type: Number}]); if (e) throw e; if (value < 0) { throw Error.argumentOutOfRange('value', value, Sys.Res.invalidTimeout); } this._timeout = value; } function Sys$Net$WebServiceProxy$get_defaultUserContext() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._userContext; } function Sys$Net$WebServiceProxy$set_defaultUserContext(value) { var e = Function._validateParams(arguments, [{name: "value", mayBeNull: true}]); if (e) throw e; this._userContext = value; } function Sys$Net$WebServiceProxy$get_defaultSucceededCallback() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._succeeded; } function Sys$Net$WebServiceProxy$set_defaultSucceededCallback(value) { var e = Function._validateParams(arguments, [{name: "value", type: Function, mayBeNull: true}]); if (e) throw e; this._succeeded = value; } function Sys$Net$WebServiceProxy$get_defaultFailedCallback() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._failed; } function Sys$Net$WebServiceProxy$set_defaultFailedCallback(value) { var e = Function._validateParams(arguments, [{name: "value", type: Function, mayBeNull: true}]); if (e) throw e; this._failed = value; } function Sys$Net$WebServiceProxy$get_path() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._path; } function Sys$Net$WebServiceProxy$set_path(value) { var e = Function._validateParams(arguments, [{name: "value", type: String}]); if (e) throw e; this._path = value; } function Sys$Net$WebServiceProxy$_invoke(servicePath, methodName, useGet, params, onSuccess, onFailure, userContext) { /// /// /// /// /// /// /// /// /// var e = Function._validateParams(arguments, [ {name: "servicePath", type: String}, {name: "methodName", type: String}, {name: "useGet", type: Boolean}, {name: "params"}, {name: "onSuccess", type: Function, mayBeNull: true, optional: true}, {name: "onFailure", type: Function, mayBeNull: true, optional: true}, {name: "userContext", mayBeNull: true, optional: true} ]); if (e) throw e; if (onSuccess === null || typeof onSuccess === 'undefined') onSuccess = this.get_defaultSucceededCallback(); if (onFailure === null || typeof onFailure === 'undefined') onFailure = this.get_defaultFailedCallback(); if (userContext === null || typeof userContext === 'undefined') userContext = this.get_defaultUserContext(); return Sys.Net.WebServiceProxy.invoke(servicePath, methodName, useGet, params, onSuccess, onFailure, userContext, this.get_timeout()); } Sys.Net.WebServiceProxy.prototype = { get_timeout: Sys$Net$WebServiceProxy$get_timeout, set_timeout: Sys$Net$WebServiceProxy$set_timeout, get_defaultUserContext: Sys$Net$WebServiceProxy$get_defaultUserContext, set_defaultUserContext: Sys$Net$WebServiceProxy$set_defaultUserContext, get_defaultSucceededCallback: Sys$Net$WebServiceProxy$get_defaultSucceededCallback, set_defaultSucceededCallback: Sys$Net$WebServiceProxy$set_defaultSucceededCallback, get_defaultFailedCallback: Sys$Net$WebServiceProxy$get_defaultFailedCallback, set_defaultFailedCallback: Sys$Net$WebServiceProxy$set_defaultFailedCallback, get_path: Sys$Net$WebServiceProxy$get_path, set_path: Sys$Net$WebServiceProxy$set_path, _invoke: Sys$Net$WebServiceProxy$_invoke } Sys.Net.WebServiceProxy.registerClass('Sys.Net.WebServiceProxy'); Sys.Net.WebServiceProxy.invoke = function Sys$Net$WebServiceProxy$invoke(servicePath, methodName, useGet, params, onSuccess, onFailure, userContext, timeout) { /// /// /// /// /// /// /// /// /// /// var e = Function._validateParams(arguments, [ {name: "servicePath", type: String}, {name: "methodName", type: String}, {name: "useGet", type: Boolean, optional: true}, {name: "params", mayBeNull: true, optional: true}, {name: "onSuccess", type: Function, mayBeNull: true, optional: true}, {name: "onFailure", type: Function, mayBeNull: true, optional: true}, {name: "userContext", mayBeNull: true, optional: true}, {name: "timeout", type: Number, optional: true} ]); if (e) throw e; var request = new Sys.Net.WebRequest(); request.get_headers()['Content-Type'] = 'application/json; charset=utf-8'; if (!params) params = {}; var urlParams = params; if (!useGet || !urlParams) urlParams = {}; request.set_url(Sys.Net.WebRequest._createUrl(servicePath+"/"+encodeURIComponent(methodName), urlParams)); var body = null; if (!useGet) { body = Sys.Serialization.JavaScriptSerializer.serialize(params); if (body === "{}") body = ""; } request.set_body(body); request.add_completed(onComplete); if (timeout && timeout > 0) request.set_timeout(timeout); request.invoke(); function onComplete(response, eventArgs) { if (response.get_responseAvailable()) { var statusCode = response.get_statusCode(); var result = null; try { var contentType = response.getResponseHeader("Content-Type"); if (contentType.startsWith("application/json")) { result = response.get_object(); } else if (contentType.startsWith("text/xml")) { result = response.get_xml(); } else { result = response.get_responseData(); } } catch (ex) { } var error = response.getResponseHeader("jsonerror"); var errorObj = (error === "true"); if (errorObj) { if (result) { result = new Sys.Net.WebServiceError(false, result.Message, result.StackTrace, result.ExceptionType); } } else if (contentType.startsWith("application/json")) { if (!result || typeof(result.d) === "undefined") { throw Sys.Net.WebServiceProxy._createFailedError(methodName, String.format(Sys.Res.webServiceInvalidJsonWrapper, methodName)); } result = result.d; } if (((statusCode < 200) || (statusCode >= 300)) || errorObj) { if (onFailure) { if (!result || !errorObj) { result = new Sys.Net.WebServiceError(false , String.format(Sys.Res.webServiceFailedNoMsg, methodName), "", ""); } result._statusCode = statusCode; onFailure(result, userContext, methodName); } else { var error; if (result && errorObj) { error = result.get_exceptionType() + "-- " + result.get_message(); } else { error = response.get_responseData(); } throw Sys.Net.WebServiceProxy._createFailedError(methodName, String.format(Sys.Res.webServiceFailed, methodName, error)); } } else if (onSuccess) { onSuccess(result, userContext, methodName); } } else { var msg; if (response.get_timedOut()) { msg = String.format(Sys.Res.webServiceTimedOut, methodName); } else { msg = String.format(Sys.Res.webServiceFailedNoMsg, methodName) } if (onFailure) { onFailure(new Sys.Net.WebServiceError(response.get_timedOut(), msg, "", ""), userContext, methodName); } else { throw Sys.Net.WebServiceProxy._createFailedError(methodName, msg); } } } return request; } Sys.Net.WebServiceProxy._createFailedError = function Sys$Net$WebServiceProxy$_createFailedError(methodName, errorMessage) { var displayMessage = "Sys.Net.WebServiceFailedException: " + errorMessage; var e = Error.create(displayMessage, { 'name': 'Sys.Net.WebServiceFailedException', 'methodName': methodName }); e.popStackFrame(); return e; } Sys.Net.WebServiceProxy._defaultFailedCallback = function Sys$Net$WebServiceProxy$_defaultFailedCallback(err, methodName) { var error = err.get_exceptionType() + "-- " + err.get_message(); throw Sys.Net.WebServiceProxy._createFailedError(methodName, String.format(Sys.Res.webServiceFailed, methodName, error)); } Sys.Net.WebServiceProxy._generateTypedConstructor = function Sys$Net$WebServiceProxy$_generateTypedConstructor(type) { return function(properties) { if (properties) { for (var name in properties) { this[name] = properties[name]; } } this.__type = type; } } Sys.Net.WebServiceError = function Sys$Net$WebServiceError(timedOut, message, stackTrace, exceptionType) { /// /// /// /// /// var e = Function._validateParams(arguments, [ {name: "timedOut", type: Boolean}, {name: "message", type: String, mayBeNull: true}, {name: "stackTrace", type: String, mayBeNull: true}, {name: "exceptionType", type: String, mayBeNull: true} ]); if (e) throw e; this._timedOut = timedOut; this._message = message; this._stackTrace = stackTrace; this._exceptionType = exceptionType; this._statusCode = -1; } function Sys$Net$WebServiceError$get_timedOut() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._timedOut; } function Sys$Net$WebServiceError$get_statusCode() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._statusCode; } function Sys$Net$WebServiceError$get_message() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._message; } function Sys$Net$WebServiceError$get_stackTrace() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._stackTrace; } function Sys$Net$WebServiceError$get_exceptionType() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._exceptionType; } Sys.Net.WebServiceError.prototype = { get_timedOut: Sys$Net$WebServiceError$get_timedOut, get_statusCode: Sys$Net$WebServiceError$get_statusCode, get_message: Sys$Net$WebServiceError$get_message, get_stackTrace: Sys$Net$WebServiceError$get_stackTrace, get_exceptionType: Sys$Net$WebServiceError$get_exceptionType } Sys.Net.WebServiceError.registerClass('Sys.Net.WebServiceError'); Type.registerNamespace('Sys.Services'); Sys.Services._ProfileService = function Sys$Services$_ProfileService() { /// if (arguments.length !== 0) throw Error.parameterCount(); Sys.Services._ProfileService.initializeBase(this); this.properties = {}; } Sys.Services._ProfileService.DefaultWebServicePath = ''; function Sys$Services$_ProfileService$get_defaultLoadCompletedCallback() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._defaultLoadCompletedCallback; } function Sys$Services$_ProfileService$set_defaultLoadCompletedCallback(value) { var e = Function._validateParams(arguments, [{name: "value", type: Function, mayBeNull: true}]); if (e) throw e; this._defaultLoadCompletedCallback = value; } function Sys$Services$_ProfileService$get_defaultSaveCompletedCallback() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._defaultSaveCompletedCallback; } function Sys$Services$_ProfileService$set_defaultSaveCompletedCallback(value) { var e = Function._validateParams(arguments, [{name: "value", type: Function, mayBeNull: true}]); if (e) throw e; this._defaultSaveCompletedCallback = value; } function Sys$Services$_ProfileService$get_path() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._path || ''; } function Sys$Services$_ProfileService$load(propertyNames, loadCompletedCallback, failedCallback, userContext) { /// /// /// /// /// var e = Function._validateParams(arguments, [ {name: "propertyNames", type: Array, mayBeNull: true, optional: true, elementType: String}, {name: "loadCompletedCallback", type: Function, mayBeNull: true, optional: true}, {name: "failedCallback", type: Function, mayBeNull: true, optional: true}, {name: "userContext", mayBeNull: true, optional: true} ]); if (e) throw e; var parameters; var methodName; if (!propertyNames) { methodName = "GetAllPropertiesForCurrentUser"; parameters = { authenticatedUserOnly: false }; } else { methodName = "GetPropertiesForCurrentUser"; parameters = { properties: this._clonePropertyNames(propertyNames), authenticatedUserOnly: false }; } this._invoke(this._get_path(), methodName, false, parameters, Function.createDelegate(this, this._onLoadComplete), Function.createDelegate(this, this._onLoadFailed), [loadCompletedCallback, failedCallback, userContext]); } function Sys$Services$_ProfileService$save(propertyNames, saveCompletedCallback, failedCallback, userContext) { /// /// /// /// /// var e = Function._validateParams(arguments, [ {name: "propertyNames", type: Array, mayBeNull: true, optional: true, elementType: String}, {name: "saveCompletedCallback", type: Function, mayBeNull: true, optional: true}, {name: "failedCallback", type: Function, mayBeNull: true, optional: true}, {name: "userContext", mayBeNull: true, optional: true} ]); if (e) throw e; var flattenedProperties = this._flattenProperties(propertyNames, this.properties); this._invoke(this._get_path(), "SetPropertiesForCurrentUser", false, { values: flattenedProperties.value, authenticatedUserOnly: false }, Function.createDelegate(this, this._onSaveComplete), Function.createDelegate(this, this._onSaveFailed), [saveCompletedCallback, failedCallback, userContext, flattenedProperties.count]); } function Sys$Services$_ProfileService$_clonePropertyNames(arr) { var nodups = []; var seen = {}; for (var i=0; i < arr.length; i++) { var prop = arr[i]; if(!seen[prop]) { Array.add(nodups, prop); seen[prop]=true; }; } return nodups; } function Sys$Services$_ProfileService$_flattenProperties(propertyNames, properties, groupName) { var flattenedProperties = {}; var val; var key; var count = 0; if (propertyNames && propertyNames.length === 0) { return { value: flattenedProperties, count: 0 }; } for (var property in properties) { val = properties[property]; key = groupName ? groupName + "." + property : property; if(Sys.Services.ProfileGroup.isInstanceOfType(val)) { var obj = this._flattenProperties(propertyNames, val, key); var groupProperties = obj.value; count += obj.count; for(var subKey in groupProperties) { var subVal = groupProperties[subKey]; flattenedProperties[subKey] = subVal; } } else { if(!propertyNames || Array.indexOf(propertyNames, key) !== -1) { flattenedProperties[key] = val; count++; } } } return { value: flattenedProperties, count: count }; } function Sys$Services$_ProfileService$_get_path() { var path = this.get_path(); if (!path.length) { path = Sys.Services._ProfileService.DefaultWebServicePath; } if (!path || !path.length) { throw Error.invalidOperation(Sys.Res.servicePathNotSet); } return path; } function Sys$Services$_ProfileService$_onLoadComplete(result, context, methodName) { if (typeof(result) !== "object") { throw Error.invalidOperation(String.format(Sys.Res.webServiceInvalidReturnType, methodName, "Object")); } var unflattened = this._unflattenProperties(result); for (var name in unflattened) { this.properties[name] = unflattened[name]; } var callback = context[0] || this.get_defaultLoadCompletedCallback() || this.get_defaultSucceededCallback(); if (callback) { var userContext = context[2] || this.get_defaultUserContext(); callback(result.length, userContext, "Sys.Services.ProfileService.load"); } } function Sys$Services$_ProfileService$_onLoadFailed(err, context, methodName) { var callback = context[1] || this.get_defaultFailedCallback(); if (callback) { var userContext = context[2] || this.get_defaultUserContext(); callback(err, userContext, "Sys.Services.ProfileService.load"); } else { Sys.Net.WebServiceProxy._defaultFailedCallback(err, methodName); } } function Sys$Services$_ProfileService$_onSaveComplete(result, context, methodName) { var count = context[3]; if (result !== null) { if (result instanceof Array) { count -= result.length; } else if (typeof(result) === 'number') { count = result; } else { throw Error.invalidOperation(String.format(Sys.Res.webServiceInvalidReturnType, methodName, "Array")); } } var callback = context[0] || this.get_defaultSaveCompletedCallback() || this.get_defaultSucceededCallback(); if (callback) { var userContext = context[2] || this.get_defaultUserContext(); callback(count, userContext, "Sys.Services.ProfileService.save"); } } function Sys$Services$_ProfileService$_onSaveFailed(err, context, methodName) { var callback = context[1] || this.get_defaultFailedCallback(); if (callback) { var userContext = context[2] || this.get_defaultUserContext(); callback(err, userContext, "Sys.Services.ProfileService.save"); } else { Sys.Net.WebServiceProxy._defaultFailedCallback(err, methodName); } } function Sys$Services$_ProfileService$_unflattenProperties(properties) { var unflattenedProperties = {}; var dotIndex; var val; var count = 0; for (var key in properties) { count++; val = properties[key]; dotIndex = key.indexOf('.'); if (dotIndex !== -1) { var groupName = key.substr(0, dotIndex); key = key.substr(dotIndex+1); var group = unflattenedProperties[groupName]; if (!group || !Sys.Services.ProfileGroup.isInstanceOfType(group)) { group = new Sys.Services.ProfileGroup(); unflattenedProperties[groupName] = group; } group[key] = val; } else { unflattenedProperties[key] = val; } } properties.length = count; return unflattenedProperties; } Sys.Services._ProfileService.prototype = { _defaultLoadCompletedCallback: null, _defaultSaveCompletedCallback: null, _path: '', _timeout: 0, get_defaultLoadCompletedCallback: Sys$Services$_ProfileService$get_defaultLoadCompletedCallback, set_defaultLoadCompletedCallback: Sys$Services$_ProfileService$set_defaultLoadCompletedCallback, get_defaultSaveCompletedCallback: Sys$Services$_ProfileService$get_defaultSaveCompletedCallback, set_defaultSaveCompletedCallback: Sys$Services$_ProfileService$set_defaultSaveCompletedCallback, get_path: Sys$Services$_ProfileService$get_path, load: Sys$Services$_ProfileService$load, save: Sys$Services$_ProfileService$save, _clonePropertyNames: Sys$Services$_ProfileService$_clonePropertyNames, _flattenProperties: Sys$Services$_ProfileService$_flattenProperties, _get_path: Sys$Services$_ProfileService$_get_path, _onLoadComplete: Sys$Services$_ProfileService$_onLoadComplete, _onLoadFailed: Sys$Services$_ProfileService$_onLoadFailed, _onSaveComplete: Sys$Services$_ProfileService$_onSaveComplete, _onSaveFailed: Sys$Services$_ProfileService$_onSaveFailed, _unflattenProperties: Sys$Services$_ProfileService$_unflattenProperties } Sys.Services._ProfileService.registerClass('Sys.Services._ProfileService', Sys.Net.WebServiceProxy); Sys.Services.ProfileService = new Sys.Services._ProfileService(); Sys.Services.ProfileGroup = function Sys$Services$ProfileGroup(properties) { /// /// var e = Function._validateParams(arguments, [ {name: "properties", mayBeNull: true, optional: true} ]); if (e) throw e; if (properties) { for (var property in properties) { this[property] = properties[property]; } } } Sys.Services.ProfileGroup.registerClass('Sys.Services.ProfileGroup'); Sys.Services._AuthenticationService = function Sys$Services$_AuthenticationService() { /// if (arguments.length !== 0) throw Error.parameterCount(); Sys.Services._AuthenticationService.initializeBase(this); } Sys.Services._AuthenticationService.DefaultWebServicePath = ''; function Sys$Services$_AuthenticationService$get_defaultLoginCompletedCallback() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._defaultLoginCompletedCallback; } function Sys$Services$_AuthenticationService$set_defaultLoginCompletedCallback(value) { var e = Function._validateParams(arguments, [{name: "value", type: Function, mayBeNull: true}]); if (e) throw e; this._defaultLoginCompletedCallback = value; } function Sys$Services$_AuthenticationService$get_defaultLogoutCompletedCallback() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._defaultLogoutCompletedCallback; } function Sys$Services$_AuthenticationService$set_defaultLogoutCompletedCallback(value) { var e = Function._validateParams(arguments, [{name: "value", type: Function, mayBeNull: true}]); if (e) throw e; this._defaultLogoutCompletedCallback = value; } function Sys$Services$_AuthenticationService$get_isLoggedIn() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._authenticated; } function Sys$Services$_AuthenticationService$get_path() { /// if (arguments.length !== 0) throw Error.parameterCount(); return this._path || ''; } function Sys$Services$_AuthenticationService$login(username, password, isPersistent, customInfo, redirectUrl, loginCompletedCallback, failedCallback, userContext) { /// /// /// /// /// /// /// /// /// var e = Function._validateParams(arguments, [ {name: "username", type: String}, {name: "password", type: String, mayBeNull: true}, {name: "isPersistent", type: Boolean, mayBeNull: true, optional: true}, {name: "customInfo", type: String, mayBeNull: true, optional: true}, {name: "redirectUrl", type: String, mayBeNull: true, optional: true}, {name: "loginCompletedCallback", type: Function, mayBeNull: true, optional: true}, {name: "failedCallback", type: Function, mayBeNull: true, optional: true}, {name: "userContext", mayBeNull: true, optional: true} ]); if (e) throw e; this._invoke(this._get_path(), "Login", false, { userName: username, password: password, createPersistentCookie: isPersistent }, Function.createDelegate(this, this._onLoginComplete), Function.createDelegate(this, this._onLoginFailed), [username, password, isPersistent, customInfo, redirectUrl, loginCompletedCallback, failedCallback, userContext]); } function Sys$Services$_AuthenticationService$logout(redirectUrl, logoutCompletedCallback, failedCallback, userContext) { /// /// /// MSCF