Example #1
0
        public ResourceWrapper(
            string resourceId,
            string versionId,
            string resourceTypeName,
            RawResource rawResource,
            ResourceRequest request,
            DateTimeOffset lastModified,
            bool deleted,
            IReadOnlyCollection <SearchIndexEntry> searchIndices,
            CompartmentIndices compartmentIndices,
            IReadOnlyCollection <KeyValuePair <string, string> > lastModifiedClaims,
            string searchParameterHash = null)
        {
            EnsureArg.IsNotNullOrEmpty(resourceId, nameof(resourceId));
            EnsureArg.IsNotNullOrEmpty(resourceTypeName, nameof(resourceTypeName));
            EnsureArg.IsNotNull(rawResource, nameof(rawResource));

            ResourceId          = resourceId;
            Version             = versionId;
            ResourceTypeName    = resourceTypeName;
            RawResource         = rawResource;
            Request             = request;
            IsDeleted           = deleted;
            LastModified        = lastModified;
            SearchIndices       = searchIndices;
            CompartmentIndices  = compartmentIndices;
            LastModifiedClaims  = lastModifiedClaims;
            SearchParameterHash = searchParameterHash;
        }
Example #2
0
 public ResourceWrapper(
     Resource resource,
     RawResource rawResource,
     ResourceRequest request,
     bool deleted,
     IReadOnlyCollection <SearchIndexEntry> searchIndices,
     CompartmentIndices compartmentIndices,
     IReadOnlyCollection <KeyValuePair <string, string> > lastModifiedClaims)
     : this(
         IsNotNull(resource).Id,
         resource.VersionId,
         resource.TypeName,
         rawResource,
         request,
         resource.Meta?.LastUpdated ?? Clock.UtcNow,
         deleted,
         searchIndices,
         compartmentIndices,
         lastModifiedClaims)
 {
 }
Example #3
0
 public ResourceWrapper(
     ResourceElement resource,
     RawResource rawResource,
     ResourceRequest request,
     bool deleted,
     IReadOnlyCollection <SearchIndexEntry> searchIndices,
     CompartmentIndices compartmentIndices,
     IReadOnlyCollection <KeyValuePair <string, string> > lastModifiedClaims,
     string searchParameterHash = null)
     : this(
         EnsureArg.IsNotNull(resource).Id,
         resource.VersionId,
         resource.InstanceType,
         rawResource,
         request,
         resource.LastUpdated ?? Clock.UtcNow,
         deleted,
         searchIndices,
         compartmentIndices,
         lastModifiedClaims,
         searchParameterHash)
 {
 }