public bool IsFromThisAppDomain() { Identity identity = RemotingServices.GetIdentityForUri(uri); if (identity == null) { return(false); // URI not registered in this domain } return(identity.IsFromThisAppDomain); }
public bool IsFromThisAppDomain() { #if !DISABLE_REMOTING Identity identity = RemotingServices.GetIdentityForUri(uri); if (identity == null) { return(false); // URI not registered in this domain } return(identity.IsFromThisAppDomain); #else return(false); #endif }
/// <summary>Returns a Boolean value that indicates whether the current <see cref="T:System.Runtime.Remoting.ObjRef" /> instance references an object located in the current <see cref="T:System.AppDomain" />.</summary> /// <returns>A Boolean value that indicates whether the current <see cref="T:System.Runtime.Remoting.ObjRef" /> instance references an object located in the current <see cref="T:System.AppDomain" />.</returns> /// <PermissionSet> /// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="Infrastructure" /> /// </PermissionSet> public bool IsFromThisAppDomain() { Identity identityForUri = RemotingServices.GetIdentityForUri(this.uri); return(identityForUri != null && identityForUri.IsFromThisAppDomain); }