コード例 #1
0
ファイル: ExternalTypeBinding.cs プロジェクト: codehaus/boo
        public bool IsAssignableFrom(ITypeBinding other)
        {
            ExternalTypeBinding external = other as ExternalTypeBinding;

            if (null == external)
            {
                return(other.IsSubclassOf(this));
            }
            return(_type.IsAssignableFrom(external._type));
        }
コード例 #2
0
        public ITypeBinding ToTypeBinding(System.Type type)
        {
            ExternalTypeBinding binding = (ExternalTypeBinding)_bindingCache[type];

            if (null == binding)
            {
                Cache(binding = new ExternalTypeBinding(this, type));
            }
            return(binding);
        }
コード例 #3
0
ファイル: ExternalTypeBinding.cs プロジェクト: codehaus/boo
        public bool IsSubclassOf(ITypeBinding other)
        {
            ExternalTypeBinding external = other as ExternalTypeBinding;

            if (null == external)
            {
                throw new NotImplementedException(other.ToString());
            }
            return(_type.IsSubclassOf(external._type));
        }
コード例 #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));
 }
コード例 #5
0
 void Cache(ExternalTypeBinding binding)
 {
     _bindingCache[binding.Type] = binding;
 }