Exemplo n.º 1
0
        public IClass ToClass(IRepository repository, IFactory factory)
        {
            var userDefinedClassProxy = this as UserDefinedClassProxy;

            if (userDefinedClassProxy != null)
            {
                return(repository.GetOrAdd(userDefinedClassProxy.GetDomPath(factory)));
            }

            var bclClassProxy = this as BclClassProxy;

            if (bclClassProxy != null)
            {
                return(BclClassProxy.ToBclClass(bclClassProxy, factory));
            }

            return(ListClassProxy.ToListClass((ListClassProxy)this, repository, factory));
        }
Exemplo n.º 2
0
        public static ClassProxy FromClass(IClass @class)
        {
            var userDefinedClass = @class as UserDefinedClass;

            if (userDefinedClass != null)
            {
                return(UserDefinedClassProxy.FromUserDefinedClass(userDefinedClass));
            }

            var bclClass = @class as IBclClass;

            if (bclClass != null)
            {
                return(BclClassProxy.FromBclClass(bclClass));
            }

            return(ListClassProxy.FromListClass((ListClass)@class));
        }
Exemplo n.º 3
0
 public static ListClass ToListClass(ListClassProxy listClassProxy, IRepository repository, IFactory factory)
 {
     return(ListClass.FromClass(listClassProxy.Class.ToClass(repository, factory)));
 }
Exemplo n.º 4
0
 public static ListClass ToListClass(ListClassProxy listClassProxy, IRepository repository, IFactory factory)
 {
     return ListClass.FromClass(listClassProxy.Class.ToClass(repository, factory));
 }