using System;
using Abp.MultiTenancy;
namespace Abp.Runtime.Session
{
///
/// Defines some session information that can be useful for applications.
///
public interface IAbpSession
{
///
/// Gets current UserId or null.
/// It can be null if no user logged in.
///
long? UserId { get; }
///
/// Gets current TenantId or null.
/// This TenantId should be the TenantId of the .
/// It can be null if given is a host user or no user logged in.
///
int? TenantId { get; }
///
/// Gets current multi-tenancy side.
///
MultiTenancySides MultiTenancySide { get; }
///
/// UserId of the impersonator.
/// This is filled if a user is performing actions behalf of the .
///
long? ImpersonatorUserId { get; }
///
/// TenantId of the impersonator.
/// This is filled if a user with performing actions behalf of the .
///
int? ImpersonatorTenantId { get; }
///
/// Used to change and for a limited scope.
///
///
///
///
IDisposable Use(int? tenantId, long? userId);
}
}