public bool canAdaptTo(Type formalArg) { if (dictionaryType.IsAssignableFrom(formalArg)) { return(true); } else if (mappedType != null) { return(((formalArg.IsInterface || formalArg.IsAbstract) && formalArg.IsAssignableFrom(mappedType)) || formalArg.IsAssignableFrom(mappedType)); } else if (formalArg.Name.Equals(objectName)) { return(true); } else if (typedObject.canAdaptTo(formalArg)) { return(true); } else { try { return(TypeLoader.LoadType(objectName).IsAssignableFrom(formalArg)); } catch (Exception) { } // if we got here, the type used by the client cannot be found on the server. // the last resort is to check if there is an argument factory return(ObjectFactories.GetArgumentObjectFactory(formalArg.FullName) != null); } }
public bool canAdaptTo(Type formalArg) { return(realType.canAdaptTo(formalArg)); }
public bool canAdaptTo(Type formalArg) { return(Object != null?Object.canAdaptTo(formalArg) : false); }