-
Notifications
You must be signed in to change notification settings - Fork 581
Expand file tree
/
Copy pathResourceWrapperOperation.cs
More file actions
60 lines (48 loc) · 2.1 KB
/
ResourceWrapperOperation.cs
File metadata and controls
60 lines (48 loc) · 2.1 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
// -------------------------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
// -------------------------------------------------------------------------------------------------
using System.Collections.Generic;
using EnsureThat;
using Microsoft.Health.Fhir.Core.Features.Search.Registry;
using Microsoft.Health.Fhir.Core.Models;
namespace Microsoft.Health.Fhir.Core.Features.Persistence
{
public class ResourceWrapperOperation
{
public ResourceWrapperOperation(
ResourceWrapper wrapper,
bool allowCreate,
bool keepHistory,
WeakETag weakETag,
bool requireETagOnUpdate,
bool keepVersion,
BundleResourceContext bundleResourceContext,
bool metaHistory = true)
{
Wrapper = EnsureArg.IsNotNull(wrapper, nameof(wrapper));
AllowCreate = allowCreate;
KeepHistory = keepHistory;
WeakETag = weakETag; // weakETag can be null.
RequireETagOnUpdate = requireETagOnUpdate;
KeepVersion = keepVersion;
BundleResourceContext = bundleResourceContext;
MetaHistory = metaHistory;
}
public ResourceWrapper Wrapper { get; }
public bool AllowCreate { get; }
public bool KeepHistory { get; }
public WeakETag WeakETag { get; }
public bool RequireETagOnUpdate { get; }
public bool KeepVersion { get; }
public bool MetaHistory { get; }
public BundleResourceContext BundleResourceContext { get; }
public IReadOnlyList<ResourceSearchParameterStatus> PendingSearchParameterStatuses { get; internal set; }
#pragma warning disable CA1024 // Use properties where appropriate
public DataStoreOperationIdentifier GetIdentifier()
{
return new DataStoreOperationIdentifier(this);
}
#pragma warning restore CA1024 // Use properties where appropriate
}
}