示例#1
0
 /// <summary>
 /// analyzes the passed expression and tries to find the path to the
 /// backing field that is accessed.
 /// </summary>
 /// <remarks>
 /// analyzes the passed expression and tries to find the path to the
 /// backing field that is accessed.
 /// </remarks>
 public virtual IEnumerator BackingFieldPath(string className, object expression)
 {
     Prototypes.Prototype prototype = (Prototypes.Prototype)_prototypes.Get(className);
     if (prototype == null)
     {
         return(null);
     }
     return(prototype.BackingFieldPath(_reflector, expression));
 }
示例#2
0
		/// <summary>returns a prototype object for a specific class.</summary>
		/// <remarks>returns a prototype object for a specific class.</remarks>
		public virtual object PrototypeForClass(Type clazz)
		{
			if (clazz == null)
			{
				throw new PrototypesException("Class can not be null");
			}
			IReflectClass claxx = _reflector.ForClass(clazz);
			if (claxx == null)
			{
				throw new PrototypesException("Not found in the reflector: " + clazz);
			}
			string className = claxx.GetName();
			Prototypes.Prototype prototype = (Prototypes.Prototype)_prototypes.Get(className);
			if (prototype != null)
			{
				return prototype.Object();
			}
			prototype = new Prototypes.Prototype(this, claxx);
			_prototypes.Put(className, prototype);
			return prototype.Object();
		}
示例#3
0
        /// <summary>returns a prototype object for a specific class.</summary>
        /// <remarks>returns a prototype object for a specific class.</remarks>
        public virtual object PrototypeForClass(Type clazz)
        {
            if (clazz == null)
            {
                throw new PrototypesException("Class can not be null");
            }
            IReflectClass claxx = _reflector.ForClass(clazz);

            if (claxx == null)
            {
                throw new PrototypesException("Not found in the reflector: " + clazz);
            }
            string className = claxx.GetName();

            Prototypes.Prototype prototype = (Prototypes.Prototype)_prototypes.Get(className);
            if (prototype != null)
            {
                return(prototype.Object());
            }
            prototype = new Prototypes.Prototype(this, claxx);
            _prototypes.Put(className, prototype);
            return(prototype.Object());
        }