示例#1
0
 public OutputStreamResult(Func <Stream, CancellationToken, Task> action, string contentType, string fileDownloadName, KeyValueLogScope scope)
 {
     _contentType      = contentType;
     _fileDownloadName = fileDownloadName;
     _action           = action;
     _scope            = scope;
 }
示例#2
0
        public static KeyValueLogScope CreateArtifactScope(string artifactType, IEndpointInfo endpointInfo)
        {
            KeyValueLogScope scope = new KeyValueLogScope();

            scope.AddArtifactType(artifactType);
            scope.AddArtifactEndpointInfo(endpointInfo);
            return(scope);
        }
 public static void AddArtifactEndpointInfo(this KeyValueLogScope scope, IEndpointInfo endpointInfo)
 {
     scope.Values.Add(
         ArtifactMetadataNames.ArtifactSource.ProcessId,
         endpointInfo.ProcessId.ToString(CultureInfo.InvariantCulture));
     scope.Values.Add(
         ArtifactMetadataNames.ArtifactSource.RuntimeInstanceCookie,
         endpointInfo.RuntimeInstanceCookie.ToString("N"));
 }
示例#4
0
 public static void AddCollectionRuleEndpointInfo(this KeyValueLogScope scope, IEndpointInfo endpointInfo)
 {
     scope.Values.Add(
         "TargetProcessId",
         endpointInfo.ProcessId.ToString(CultureInfo.InvariantCulture));
     scope.Values.Add(
         "TargetRuntimeInstanceCookie",
         endpointInfo.RuntimeInstanceCookie.ToString("N"));
 }
 public static void AddArtifactType(this KeyValueLogScope scope, string artifactType)
 {
     scope.Values.Add("ArtifactType", artifactType);
 }
示例#6
0
 public static void AddCollectionRuleAction(this KeyValueLogScope scope, string actionType, int actionIndex)
 {
     scope.Values.Add("CollectionRuleActionType", actionType);
     scope.Values.Add("CollectionRuleActionIndex", actionIndex);
 }
示例#7
0
 public static void AddCollectionRuleTrigger(this KeyValueLogScope scope, string triggerType)
 {
     scope.Values.Add("CollectionRuleTriggerType", triggerType);
 }
示例#8
0
 public static void AddCollectionRuleName(this KeyValueLogScope scope, string ruleName)
 {
     scope.Values.Add("CollectionRuleName", ruleName);
 }
示例#9
0
 public EgressOperation(Func <Stream, CancellationToken, Task> action, string endpointName, string artifactName, IEndpointInfo source, string contentType, KeyValueLogScope scope)
 {
     _egress         = (service, token) => service.EgressAsync(endpointName, action, artifactName, contentType, source, token);
     _egressProvider = endpointName;
     _scope          = scope;
 }