Ejemplo n.º 1
0
 public void RemoveContentFactory(IPageContentFactory f)
 {
     if (this.mContentFactories.ContainsKey(f.Name))
     {
         this.mContentFactories.Remove(f.Name);
     }
 }
Ejemplo n.º 2
0
        public PageContent CreateContent(string typeName)
        {
            IPageContentFactory fact = GetContentFactory(typeName);

            if (fact == null)
            {
                throw new AxiomException("{0} is not the name of a valid PageContentFactory! PageManager.CreateContent", typeName);
            }

            return(fact.CreateInstance());
        }
Ejemplo n.º 3
0
        public void AddContentFactory(IPageContentFactory f)
        {
            // note - deliberately allowing overriding
            if (this.mContentFactories.ContainsKey(f.Name))
            {
                this.mContentFactories[f.Name] = f;
                return;
            }

            this.mContentFactories.Add(f.Name, f);
        }
Ejemplo n.º 4
0
        public void DestroyContent(ref PageContent c)
        {
            IPageContentFactory fact = GetContentFactory(c.Type);

            if (fact != null)
            {
                fact.DestroyInstance(ref c);
            }
            else
            {
                c.SafeDispose();                 // normally a safe fallback
            }
        }
Ejemplo n.º 5
0
 public PageContent(IPageContentFactory creator)
 {
     this.mCreator = creator;
 }
Ejemplo n.º 6
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="creator"></param>
 public PageContent(IPageContentFactory creator)
 {
     mCreator = creator;
 }
Ejemplo n.º 7
0
		public void RemoveContentFactory( IPageContentFactory f )
		{
			if ( this.mContentFactories.ContainsKey( f.Name ) )
			{
				this.mContentFactories.Remove( f.Name );
			}
		}
Ejemplo n.º 8
0
		public void AddContentFactory( IPageContentFactory f )
		{
			// note - deliberately allowing overriding
			if ( this.mContentFactories.ContainsKey( f.Name ) )
			{
				this.mContentFactories[ f.Name ] = f;
				return;
			}

			this.mContentFactories.Add( f.Name, f );
		}
Ejemplo n.º 9
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="f"></param>
 public void RemoveContentFactory(IPageContentFactory f)
 {
     mContentFactories.Remove(f.Name);
 }
Ejemplo n.º 10
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="f"></param>
        public void AddContentFactory(IPageContentFactory f)
        {
            // note - deliberately allowing overriding
            if (mContentFactories.ContainsKey(f.Name))
                mContentFactories.Remove(f.Name);

            mContentFactories.Add(f.Name, f);
        }