isLocalResource static method

bool isLocalResource(
  1. IResource resource,
  2. DistributedConnection connection
)
Check if a resource is local to a given connection. Resource to check. DistributedConnection to check if the resource is local to it.

Implementation

static bool isLocalResource(
    IResource resource, DistributedConnection connection) {
  if (resource is DistributedResource) {
    if (resource.connection == connection) return true;
  }
  return false;
}