forked from yavordimitrov/SmartStoreNET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIWorkContext.cs
More file actions
68 lines (58 loc) · 2.3 KB
/
Copy pathIWorkContext.cs
File metadata and controls
68 lines (58 loc) · 2.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
using SmartStore.Core.Domain.Customers;
using SmartStore.Core.Domain.Directory;
using SmartStore.Core.Domain.Localization;
using SmartStore.Core.Domain.Tax;
namespace SmartStore.Core
{
/// <summary>
/// Work context
/// </summary>
public interface IWorkContext
{
/// <summary>
/// Gets or sets the current customer
/// </summary>
Customer CurrentCustomer { get; set; }
/// <summary>
/// Gets or sets the original customer (in case the current one is impersonated)
/// </summary>
Customer OriginalCustomerIfImpersonated { get; }
/// <summary>
/// Get or set current user working language
/// </summary>
Language WorkingLanguage { get; set; }
/// <summary>
/// Gets a value indicating whether a language exists and is published within a store's scope.
/// </summary>
/// <param name="seoCode">The unique seo code of the language to check for</param>
/// <param name="storeId">The store id (will be resolved internally when 0)</param>
/// <returns>Whether the language exists and is published</returns>
bool IsPublishedLanguage(string seoCode, int storeId = 0);
/// <summary>
/// Gets the default (fallback) language for a store
/// </summary>
/// <param name="storeId">The store id (will be resolved internally when 0)</param>
/// <returns>The unique seo code of the language to check for</returns>
string GetDefaultLanguageSeoCode(int storeId = 0);
/// <summary>
/// Get or set current user working currency
/// </summary>
Currency WorkingCurrency { get; set; }
/// <summary>
/// Get or set current tax display type
/// </summary>
TaxDisplayType TaxDisplayType { get; set; }
/// <summary>
/// Gets the tax display type for a given customer
/// </summary>
TaxDisplayType GetTaxDisplayTypeFor(Customer customer, int storeId);
/// <summary>
/// Gets or sets a value indicating whether we're in admin area
/// </summary>
bool IsAdmin { get; set; }
///// <summary>
///// Gets a value indicating whether we're in the public shop
///// </summary>
//bool IsPublic { get; }
}
}