Exemple #1
0
        internal void RegisterScriptBlock(ScriptKey key, string script, ClientAPIRegisterType type)
        {
            switch (type)
            {
            case ClientAPIRegisterType.ClientScriptBlocks:
                this.RegisterScriptBlock(key, script, ref this._registeredClientScriptBlocks, ref this._clientScriptBlocks, false);
                break;

            case ClientAPIRegisterType.ClientScriptBlocksWithoutTags:
                this.RegisterScriptBlock(key, script, ref this._registeredClientScriptBlocks, ref this._clientScriptBlocks, true);
                break;

            case ClientAPIRegisterType.ClientStartupScripts:
                this.RegisterScriptBlock(key, script, ref this._registeredClientStartupScripts, ref this._clientStartupScripts, false);
                break;

            case ClientAPIRegisterType.ClientStartupScriptsWithoutTags:
                this.RegisterScriptBlock(key, script, ref this._registeredClientStartupScripts, ref this._clientStartupScripts, true);
                break;
            }
            if (this._owner.PartialCachingControlStack != null)
            {
                foreach (BasePartialCachingControl control in this._owner.PartialCachingControlStack)
                {
                    control.RegisterScriptBlock(type, key, script);
                }
            }
        }
        private void RegisterClientCall(ClientAPIRegisterType type, ScriptKey scriptKey, string stringParam2)
        {
            RegisterCallData data = new RegisterCallData {
                Type         = type,
                Key          = scriptKey,
                StringParam2 = stringParam2
            };

            if (this._cacheEntry.RegisteredClientCalls == null)
            {
                this._cacheEntry.RegisteredClientCalls = new ArrayList();
            }
            this._cacheEntry.RegisteredClientCalls.Add(data);
        }
        private void RegisterClientCall(ClientAPIRegisterType type, string stringParam1, string stringParam2, string stringParam3)
        {
            RegisterCallData data = new RegisterCallData {
                Type         = type,
                StringParam1 = stringParam1,
                StringParam2 = stringParam2,
                StringParam3 = stringParam3
            };

            if (this._cacheEntry.RegisteredClientCalls == null)
            {
                this._cacheEntry.RegisteredClientCalls = new ArrayList();
            }
            this._cacheEntry.RegisteredClientCalls.Add(data);
        }
        private void RegisterClientCall(ClientAPIRegisterType type,
                                        ScriptKey scriptKey, string stringParam2)
        {
            // Keep track of the call, in order to be able to call it again when there is a cache hit.

            RegisterCallData registerCallData = new RegisterCallData();

            registerCallData.Type         = type;
            registerCallData.Key          = scriptKey;
            registerCallData.StringParam2 = stringParam2;

            if (_cacheEntry.RegisteredClientCalls == null)
            {
                _cacheEntry.RegisteredClientCalls = new ArrayList();
            }

            _cacheEntry.RegisteredClientCalls.Add(registerCallData);
        }
 internal void RegisterScriptBlock(ClientAPIRegisterType type, ScriptKey key, string script)
 {
     RegisterClientCall(type, key, script);
 }
 private void RegisterClientCall(ClientAPIRegisterType type,
                                 string stringParam1, string stringParam2)
 {
     RegisterClientCall(type, stringParam1, stringParam2, null);
 }
 internal void RegisterScriptBlock(ClientAPIRegisterType type, ScriptKey key, string script) {
     RegisterClientCall(type, key, script);
 }
    private void RegisterClientCall(ClientAPIRegisterType type,
        string stringParam1, string stringParam2, string stringParam3) {

        // Keep track of the call, in order to be able to call it again when there is a cache hit.

        RegisterCallData registerCallData = new RegisterCallData();
        registerCallData.Type = type;
        registerCallData.StringParam1 = stringParam1;
        registerCallData.StringParam2 = stringParam2;
        registerCallData.StringParam3 = stringParam3;

        if (_cacheEntry.RegisteredClientCalls == null)
            _cacheEntry.RegisteredClientCalls = new ArrayList();

        _cacheEntry.RegisteredClientCalls.Add(registerCallData);
    }
 private void RegisterClientCall(ClientAPIRegisterType type,
     string stringParam1, string stringParam2) {
     RegisterClientCall(type, stringParam1, stringParam2, null);
 }
Exemple #10
0
        internal void RegisterScriptBlock(ScriptKey key, string script, ClientAPIRegisterType type) {

            // Call RegisterScriptBlock with the correct collection based on the blockType
            switch (type) {
                case ClientAPIRegisterType.ClientScriptBlocks:
                    RegisterScriptBlock(key, script, ref _registeredClientScriptBlocks, ref _clientScriptBlocks, false);
                    break;
                case ClientAPIRegisterType.ClientScriptBlocksWithoutTags:
                    RegisterScriptBlock(key, script, ref _registeredClientScriptBlocks, ref _clientScriptBlocks, true);
                    break;
                case ClientAPIRegisterType.ClientStartupScripts:
                    RegisterScriptBlock(key, script, ref _registeredClientStartupScripts, ref _clientStartupScripts, false);
                    break;
                case ClientAPIRegisterType.ClientStartupScriptsWithoutTags:
                    RegisterScriptBlock(key, script, ref _registeredClientStartupScripts, ref _clientStartupScripts, true);
                    break;
                default:
                    Debug.Assert(false);
                    break;
            }

            // If there are any partial caching controls on the stack, forward the call to them
            if (_owner.PartialCachingControlStack != null) {
                foreach (BasePartialCachingControl c in _owner.PartialCachingControlStack) {
                    c.RegisterScriptBlock(type, key, script);
                }
            }
        }
 private void RegisterClientCall(ClientAPIRegisterType type, string stringParam1, string stringParam2, string stringParam3)
 {
     RegisterCallData data = new RegisterCallData {
         Type = type,
         StringParam1 = stringParam1,
         StringParam2 = stringParam2,
         StringParam3 = stringParam3
     };
     if (this._cacheEntry.RegisteredClientCalls == null)
     {
         this._cacheEntry.RegisteredClientCalls = new ArrayList();
     }
     this._cacheEntry.RegisteredClientCalls.Add(data);
 }
 private void RegisterClientCall(ClientAPIRegisterType type, ScriptKey scriptKey, string stringParam2)
 {
     RegisterCallData data = new RegisterCallData {
         Type = type,
         Key = scriptKey,
         StringParam2 = stringParam2
     };
     if (this._cacheEntry.RegisteredClientCalls == null)
     {
         this._cacheEntry.RegisteredClientCalls = new ArrayList();
     }
     this._cacheEntry.RegisteredClientCalls.Add(data);
 }
        internal void RegisterScriptBlock(ScriptKey key, string script, ClientAPIRegisterType type)
        {
            switch (type)
            {
                case ClientAPIRegisterType.ClientScriptBlocks:
                    this.RegisterScriptBlock(key, script, ref this._registeredClientScriptBlocks, ref this._clientScriptBlocks, false);
                    break;

                case ClientAPIRegisterType.ClientScriptBlocksWithoutTags:
                    this.RegisterScriptBlock(key, script, ref this._registeredClientScriptBlocks, ref this._clientScriptBlocks, true);
                    break;

                case ClientAPIRegisterType.ClientStartupScripts:
                    this.RegisterScriptBlock(key, script, ref this._registeredClientStartupScripts, ref this._clientStartupScripts, false);
                    break;

                case ClientAPIRegisterType.ClientStartupScriptsWithoutTags:
                    this.RegisterScriptBlock(key, script, ref this._registeredClientStartupScripts, ref this._clientStartupScripts, true);
                    break;
            }
            if (this._owner.PartialCachingControlStack != null)
            {
                foreach (BasePartialCachingControl control in this._owner.PartialCachingControlStack)
                {
                    control.RegisterScriptBlock(type, key, script);
                }
            }
        }