/// <summary>
        /// 取保资源管理对象。
        /// </summary>
        void EnsureResourcesManagement()
        {
            if (this.resourcesManagement == null)
            {

                ResourceCollection resources = this.Resources;
                if (resources == null)
                    resources = new ResourceCollection();

                this.resourcesManagement = new ResourcesManagement(resources);
                this.resourcesManagement.ResourcesPersist += this.ResourcesManagement_ResourcesPersist;
                this.resourcesManagement.ResourcesPersistAfter += new EventHandler(delegate(object sender, EventArgs e)
                {
                    cache.Clear();
                });
            }
        }
 /// <summary>
 /// 确保资源管理类。
 /// </summary>
 /// <returns></returns>
 void EnsureResourceManager()
 {
     if (this.resourcesManagement == null)
     {
         ResourceCollection resource = this.CreateResources();
         if (resource != null)
             this.resourcesManagement = new ResourcesManagement(resource);
     }
 }