forked from microsoft/service-fabric
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApplicationHostIsolationContext.h
50 lines (39 loc) · 2.07 KB
/
ApplicationHostIsolationContext.h
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
// ------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
// ------------------------------------------------------------
#pragma once
namespace Hosting2
{
class ApplicationHostIsolationContext
{
public:
enum ProcessSharingLevel
{
ProcessSharingLevel_Application,
ProcessSharingLevel_CodePackage
};
public:
ApplicationHostIsolationContext(std::wstring const & processContext, std::wstring const & userContext);
ApplicationHostIsolationContext(ApplicationHostIsolationContext const & other);
ApplicationHostIsolationContext(ApplicationHostIsolationContext && other);
ApplicationHostIsolationContext const & operator = (ApplicationHostIsolationContext const & other);
ApplicationHostIsolationContext const & operator = (ApplicationHostIsolationContext && other);
bool operator == (ApplicationHostIsolationContext const & other) const;
bool operator != (ApplicationHostIsolationContext const & other) const;
int compare(ApplicationHostIsolationContext const & other) const;
bool operator < (ApplicationHostIsolationContext const & other) const;
void WriteTo(Common::TextWriter & w, Common::FormatOptions const &) const;
ProcessSharingLevel GetProcessSharingLevel() const;
static ApplicationHostIsolationContext Create(
CodePackageInstanceIdentifier const & codePackageInstanceId,
std::wstring const & runAs,
uint64 instanceId,
ServiceModel::CodePackageIsolationPolicyType::Enum const & codeIsolationPolicy);
static Common::GlobalWString CodePackageSharing;
static Common::GlobalWString ApplicationSharing;
private:
std::wstring processContext_;
std::wstring userContext_;
};
}