public bool IsAssignableFrom(ITypeBinding other) { ExternalTypeBinding external = other as ExternalTypeBinding; if (null == external) { return(other.IsSubclassOf(this)); } return(_type.IsAssignableFrom(external._type)); }
public ITypeBinding ToTypeBinding(System.Type type) { ExternalTypeBinding binding = (ExternalTypeBinding)_bindingCache[type]; if (null == binding) { Cache(binding = new ExternalTypeBinding(this, type)); } return(binding); }
public bool IsSubclassOf(ITypeBinding other) { ExternalTypeBinding external = other as ExternalTypeBinding; if (null == external) { throw new NotImplementedException(other.ToString()); } return(_type.IsSubclassOf(external._type)); }
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)); }
void Cache(ExternalTypeBinding binding) { _bindingCache[binding.Type] = binding; }