Ejemplo n.º 1
0
        public bool IsAssignableFrom(ITypeBinding other)
        {
            ExternalTypeBinding external = other as ExternalTypeBinding;

            if (null == external)
            {
                return(other.IsSubclassOf(this));
            }
            return(_type.IsAssignableFrom(external._type));
        }
Ejemplo n.º 2
0
        public ITypeBinding ToTypeBinding(System.Type type)
        {
            ExternalTypeBinding binding = (ExternalTypeBinding)_bindingCache[type];

            if (null == binding)
            {
                Cache(binding = new ExternalTypeBinding(this, type));
            }
            return(binding);
        }
Ejemplo n.º 3
0
        public bool IsSubclassOf(ITypeBinding other)
        {
            ExternalTypeBinding external = other as ExternalTypeBinding;

            if (null == external)
            {
                throw new NotImplementedException(other.ToString());
            }
            return(_type.IsSubclassOf(external._type));
        }
Ejemplo n.º 4
0
 public BindingManager()
 {
     Cache(VoidTypeBinding   = new VoidTypeBindingImpl(this));
     Cache(ObjectTypeBinding = new ExternalTypeBinding(this, Types.Object));
     Cache(StringTypeBinding = new ExternalTypeBinding(this, Types.String));
     Cache(BoolTypeBinding   = new ExternalTypeBinding(this, Types.Bool));
     Cache(IntTypeBinding    = new ExternalTypeBinding(this, Types.Int));
     Cache(SingleTypeBinding = new ExternalTypeBinding(this, Types.Single));
     Cache(new ExternalTypeBinding(this, Types.Date));
     Cache(RuntimeServicesBinding      = new ExternalTypeBinding(this, Types.RuntimeServices));
     Cache(ListTypeBinding             = new ExternalTypeBinding(this, Types.List));
     Cache(ObjectArrayBinding          = new ExternalTypeBinding(this, Types.ObjectArray));
     Cache(ApplicationExceptionBinding = new ExternalTypeBinding(this, Types.ApplicationException));
 }
Ejemplo n.º 5
0
 void Cache(ExternalTypeBinding binding)
 {
     _bindingCache[binding.Type] = binding;
 }