示例#1
0
        private void CleanTemplateContextByValue(string value)
        {
            List <string> keys = (from key in ContextData.AllKeys
                                  let contextValues = ContextData.GetValues(key)
                                                      where contextValues != null && contextValues.Length > 0 && contextValues[0] == value
                                                      select key).ToList();

            foreach (string key in keys)
            {
                ContextData.Remove(key);
            }
        }