bool IRemotingTypeInfo.CanCastTo(System.Type targetType, object o) { // Console.WriteLine ("CanCastTo: " + targetType); // if this is a local servant, check it directly if (_realObject != null) { return(targetType.IsInstanceOfType(_realObject)); } // check if the thing was created with a valid type if (targetType.IsInstanceOfType(o)) { return(true); } // otherwise, perform the remote query if necessary string icename = IceUtil.TypeToIceName(targetType); if (_typeIds == null) { Ice.Object iob = o as Ice.Object; _typeIds = iob.ice_ids(); } return(((IList)_typeIds).Contains(icename)); }
public static DispatchStatus ice_ids___(Ice.Object __obj, IceInternal.Incoming inS__, Current __current) { inS__.readEmptyParams(); string[] ret__ = __obj.ice_ids(__current); IceInternal.BasicStream os__ = inS__.startWriteParams__(FormatType.DefaultFormat); os__.writeStringSeq(ret__); inS__.endWriteParams__(true); return(DispatchStatus.DispatchOK); }
public static Task <Ice.OutputStream> ice_ids___(Ice.Object __obj, IceInternal.Incoming inS__, Current __current) { inS__.readEmptyParams(); var ret__ = __obj.ice_ids(__current); var os__ = inS__.startWriteParams(); os__.writeStringSeq(ret__); inS__.endWriteParams(os__); inS__.setResult(os__); return(null); }
public static Task <Ice.OutputStream> iceD_ice_ids(Ice.Object obj, IceInternal.Incoming inS, Current current) { inS.readEmptyParams(); var ret = obj.ice_ids(current); var ostr = inS.startWriteParams(); ostr.writeStringSeq(ret); inS.endWriteParams(ostr); inS.setResult(ostr); return(null); }