static private IsWellFormed ( |
||
objectRef | ||
return | bool |
internal static bool IsWellFormed(ObjRef objectRef)
{
// We skip the wellformed check for wellKnown,
// objref-lite and custom objrefs
bool wellFormed = true;
if ((null == objectRef) ||
(null == objectRef.URI) ||
(!(objectRef.IsWellKnown() || objectRef.IsObjRefLite() ||
objectRef.GetType() != orType)
&& (null == objectRef.ChannelInfo)))
{
wellFormed = false;
}
return wellFormed;
}
} // ObjRef
private CrossAppDomainData GetAppDomainChannelData() { BCLDebug.Assert( ObjRef.IsWellFormed(this), "ObjRef.IsWellFormed()"); // Look at the ChannelData part to find CrossAppDomainData int i = 0; CrossAppDomainData xadData = null; while (i < ChannelInfo.ChannelData.Length) { xadData = ChannelInfo.ChannelData[i] as CrossAppDomainData; if (null != xadData) { return(xadData); } i++; } // AdData could be null for user-created objRefs. return(null); }